Bluepearl Design
Go Back   Bluepearl Design > Bluepearl Design > Need Help?

AS2 script for buttons

Ask us questions relavent to Web Design and Computers.
Also support for Bluepearl Design and webclans.net hosting.

    

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old 06-07-2005, 09:16 PM   #1 (permalink)
 
Title: Member
Join Date: Jun 2005
Location: The Netherlands
Age: 20
Posts: 4
Rep Power: 0 Dragonius is on a distinguished road
Send a message via AIM to Dragonius Send a message via MSN to Dragonius Send a message via Yahoo to Dragonius
AS2 script for buttons

Hey Guys

I'm having some trouble with creating a button in Flash MX 2004 Pro.
The creating button part i understand but i can't quite seem to give the button an action like on click goto www.macromedia.com or when the button is clicked it takes you to a nother part of a presentation.
I can't find any tuts on the web which gives you the script in AS2 instead of AS1 (Actionscript)

Regards, Drag
Dragonius is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-07-2005, 11:47 PM   #2 (permalink)
 
Sean's Avatar
 
Title: Founder/Admin
Join Date: Jan 2004
Location: Sydney, Australia
Age: 28
Posts: 8,907
Images: 386
Blog Entries: 4
Rep Power: 10 Sean will become famous soon enough
Send a message via MSN to Sean Send a message via Skype™ to Sean
Re: AS2 script for buttons

ok to goto another web site add this

Code:
on (release) {
	getURL("http://www.bluepearl-design.com");
}
to another part of your flash file add this:
Code:
on (release) {
_root.gotoAndPlay("frame1", 1)
}
hope this helps
Sean is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-08-2005, 04:00 AM   #3 (permalink)
 
Title: Member
Join Date: Jun 2005
Location: The Netherlands
Age: 20
Posts: 4
Rep Power: 0 Dragonius is on a distinguished road
Send a message via AIM to Dragonius Send a message via MSN to Dragonius Send a message via Yahoo to Dragonius
Re: AS2 script for buttons

nope it doesn't


I get this instead in the output window:
Quote:
**Error** Scene=Scene 1, layer=Layer 1, frame=25:Line 1: Mouse events are permitted only for button instances
on (release) {

Total ActionScript Errors: 1 Reported Errors: 1
Dragonius is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-08-2005, 05:19 AM   #4 (permalink)
 
Sean's Avatar
 
Title: Founder/Admin
Join Date: Jan 2004
Location: Sydney, Australia
Age: 28
Posts: 8,907
Images: 386
Blog Entries: 4
Rep Power: 10 Sean will become famous soon enough
Send a message via MSN to Sean Send a message via Skype™ to Sean
Re: AS2 script for buttons

this error means u havent added the actionscript to a button.

Make sure u create a button and then add the actionscript to it.
Sean is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-09-2005, 07:38 PM   #5 (permalink)
 
Title: Member
Join Date: Jun 2005
Location: The Netherlands
Age: 20
Posts: 4
Rep Power: 0 Dragonius is on a distinguished road
Send a message via AIM to Dragonius Send a message via MSN to Dragonius Send a message via Yahoo to Dragonius
Re: AS2 script for buttons

Yeah it works now , thx

do you have any idea why it works now and why it didn't work in the past, i haven't done anything different when creating buttons and adding that script?
but then yet it never worked.

thx again for your help
Dragonius is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-09-2005, 07:50 PM   #6 (permalink)
 
Title: Member
Join Date: Jun 2005
Location: The Netherlands
Age: 20
Posts: 4
Rep Power: 0 Dragonius is on a distinguished road
Send a message via AIM to Dragonius Send a message via MSN to Dragonius Send a message via Yahoo to Dragonius
Re: AS2 script for buttons

LMAO now i see it

i normaly select the entire layer other then the button it self on that layer
LOL anyway thx for your help, now i can finally continue exploring Flash
Attached Files
File Type: swf Drag's First working button.swf (984 Bytes, 87 views)
Dragonius is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-10-2005, 01:09 AM   #7 (permalink)
 
Sean's Avatar
 
Title: Founder/Admin
Join Date: Jan 2004
Location: Sydney, Australia
Age: 28
Posts: 8,907
Images: 386
Blog Entries: 4
Rep Power: 10 Sean will become famous soon enough
Send a message via MSN to Sean Send a message via Skype™ to Sean
Re: AS2 script for buttons

Quote:
Originally Posted by Dragonius
LMAO now i see it

i normaly select the entire layer other then the button it self on that layer
LOL anyway thx for your help, now i can finally continue exploring Flash
np and good luck
Sean is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads for: AS2 script for buttons
Thread Thread Starter Forum Replies Last Post
a "little" php script needed Fragalot Need Help? 5 03-17-2005 02:53 AM
Script errors... Infamous Need Help? 4 01-25-2004 09:59 PM
[Javascript] Date Script Sean HTML, XHTML, Javascript, CSS 0 01-15-2004 07:04 PM


  
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Bluepearl Templates

All times are GMT +11. The time now is 07:00 AM.

 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52