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

Button Actionscripting...

Status
Not open for further replies.

ronnyjljr

IS-IT--Management
Nov 23, 2003
249
US
Hiya Again,

Ok so I have a button that when clicked the scene needs to change. If you look at my code below, the Trace works but the gotoAndPlay() does not. Why does this not work?

Code:
[blue]
on (click)
{
	trace("Blah!");

	gotoAndPlay("Scene 4",1);
}

[/blue]


Any thoughts?

Thanks,
Ron

cout << "If you don't know where you want to go, we'll make sure you get taken";
 
you can't address scenes, you have to label a frame gotoAndPlay ("whatever");

 
I prefer to put labels on a separate layer (very much like actions). Then you click on a keyframe and in the properties inspector at the bottom left corner where it says "frame" you give it a name and click enter and then in your timeline you will see a flag with your name. Now you can address it via actionscript. Make sure your label in the timeline is where you want it to be. Sorry, last sentence kind of sounds stupid :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top