|
-
Senior Member
Simple goto and play question
I am trying to use the goto and play action. I want the goto and play at frame 2 but for some reason the error that I don't have it within and on handler. What am I doing wrong.. I am not sure what I am missing. I am using the actions pallet to do this. I have Flash MX 2004.. The error reads below.
**Error** Scene=Scene 1, layer=black team button, frame=1:Line 2: Statement must appear within on handler
gotoAndPlay(2);
-
Apparently you want your action on a button, so you'd need the button's event handler.
on (release) {
_root.gotoAndPlay(2);
}
gparis
-
Senior Member
I have tried what you have sent.. and yes this is a button.. But it keeps saying the same error. ugghh
-
then you didn't put that code ON the button, but ON a frame
You can also use the MX method, specifying the instance name of the button, and that will go ON a frame:
_root.myButton.onRelease = function() {
_root.gotoAndPlay(2);
};
gparis
-
Senior Member
I am a bonehead.. I did get it to work.. I appreciate all your help.. I totally was stumped.. Back in Flash 5 all you did was click on the action and add your frame number.. I like flash mx but sometimes seems more difficult..
thanks again for your help...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|