-
Senior Member
gotoAndPlay question
To go to another scene I use this:
gotoAndPlay("scene", frame);
How do I make the movie go to a scene that is a variable?
-
Milk n' 2 shugaz Paleez.
try
var mySceneVariable = "EndCredits"
gotoAndPlay([mySceneVariable], frame);
I think
-
Senior Member
I've tried that and it doesn't work!
Can anyone help me with this?
-
Milk n' 2 shugaz Paleez.
hmmmm ought to work...
have you tried running a trace on the variable? it's possible that it isn't containing the correct data?
-
Senior Member
What's a trace?
And what version of Flash are you using?
-
Milk n' 2 shugaz Paleez.
look up "Using the Debugger" in the flash help section.
If you're doing anything with actionscript and you're not familiar with flash's debugging tools you've got a lot of headaches coming your way.
I'm using Flash MX but the syntax for what you're looking for has been static since flash 5 I think. possibly even longer.
-
Senior Member
Thank you, but I solved it myself:
First I declare a variable:
code: scene = "\"illustration\", 1";
Then the button does this:
code: on (release) {
gotoAndPlay(scene);
}
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
|