-
Banned By GMF Wannabe
I have 2 scenes.
Scene 1 has a button inside a movie clip. How the hell do I jump to Scene 2 by clicking on this button?
Sounds easy right? Well the normal script of:
on (release) {
gotoAndStop ("Scene 2", 1);
}
DOES NOT WORK!!!!!!!!!
This is driving me mad! Somebody please help!
-
If the button is inside a movie clip, it's trying to jump to scene 2 within that MC, unless you tell it otherwise, I'm thinking.
I'd think you'd have to access it via _root somehow, but I avoid scenes at all costs, so I'm not sure of the exact code. Seems like it would be this:
on (release) {
_root.gotoAndStop ("Scene 2", 1);
}
Hope that works.
Best,
Tom
-
Hi,
bin the "scene 2" bit. Give you first frame in Scene 2 a label and inside the button put the code
gotoAndPlay("new_label");
That should do it.
Keef
-
Banned By GMF Wannabe
Neither work!!! This is such a simple thing - it's driving me mad!
Does anybody know???
-
If your Scene 1 has 23 frames, you want go to the Scene 2 first frame, then that is 24th frame.
_root.gotoAndStop(24);
It is bad to use absolute number of frame.
But, at least it works.
-
Hi...the easiest way to do this is....
Go to the frame you want to go to...in the scene you want to go to...and put a "label".
Then on your button in your movieClip, put this action:
on (release) {
_root.gotoAndStop("yourLabel");
}
You can enter this action in the Expert Mode in the Actions Panel............. or to enter this in the Normal Mode in the Actions Panel, scroll down to Objects>MovieClip>gotoAndStop (or gotoAndPlay)......... DoubleClick and it automatically puts the on(release) part of the code.
Then in the Expression box, type the path in front of the dot (in this case, _root). Where it asks for the frame, put in your "label".............be sure to put quotes around it.
Hope this helps...
-pigghost-
-
Wow, that is great. Now I learned. I have been confused by "Scene" thing for long.
In Scene 1
gotoAndStop("Scene2_label") - no
gotoAndStop("Scene 2","Scene2_label") - yes
_root.gotoAndStop("Scene2_label") - yes
_root.gotoAndStop("Scene 2","Scene2_label") - no
Thanx
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
|