Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Action Script for Button Links

Status
Not open for further replies.

jerobert

Technical User
May 25, 2004
25
CA
Hi there, a little new to flash, I need to know if/how to make a button instance linkable.

For instance i'm trying to create rollover buttons, with a small horzintonal menu that will aprear with various links(there will be several links on the menu). So I need to make each button linkable but not on the main timeline, only on the button. I believe isolating the script is crucial here.

Is this possible? Any help is appreciated. Thanks.
 
Yes it is possible but you do not have to isolate the script. On the main timeline you can use:

Code:
buttonInstanceName.onRelease = function(){
     //do stuff
}

Otherwise simply right click on the button and select actions from the list.

Hope it helps.

Wow JT that almost looked like you knew what you were doing!
 
Thank you gentlemen. What happens if your button needing the code is inside another button?

This now seems to be an issue, I get 'Statement must appear within on handler' from the output error window.
 
Can you have a movie clip inside a button, which has other buttons?
 
What you need is a button that controls a movieclip that has more buttons in it. How's that? :)

Wow JT that almost looked like you knew what you were doing!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top