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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActionScripting Buttons

Status
Not open for further replies.

Gwydion

Technical User
Dec 5, 2001
5
US
I am trying to write script for a button from the _root timeline for a button located in a movie clip named "navbar". I want the button to make the movie clip's timeline goto and play the frame labeled "audio". This is the code I've come up with.

_root.navbar.avbutton.onRelease = function() {
_parent.doRelease(gotoAndPlay ("audio"));
};

However, I can't seem to get the button to work. Can someone tell me what is wrong with my code, or a different way to do this. I would rather not code the button, because I want all of my code in a central location to make it easier to revise in the future.

Thanks for any help you can give.
 
is that code MX? i don't recognise it. anywho try this:

on(press) {
_root.navbar.gotoAndPlay("audio")
}
 
yes it is MX.

I will give it a try. Thanks
 
This script is a little dated, but it will still work perfectly in MX.

tellTarget ("_root.navbar") {
gotoAndPlay("Audio");
}


Good Luck!!
__________________________________
Keep On Coding!!

Lumstar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top