-
Button in MC won't go to scene
Hi,
I tried searching for this, but the search keeps bringing up a blank page.
I have a a movie and to keep it simple lets say I have 2 scenes:
Main and Location (Location has a frame label on the first frame called "Local")
In the main timeline I have a movie clip which contains a button. All I want to do, it when you press that button the Movie will go to the "Location" scene.
I've tried the following, but none have worked.
on (release) {
gotoAndPlay("Location", 1);
}
on (release) {
gotoAndPlay("Location", "Local");
}
on (release) {
_root.gotoAndPlay("Location", 1);
}
on (release) {
_root.Location.gotoAndPlay(1);
}
on (release) {
_level0.gotoAndPlay("Location", 1);
}
on (release) {
_level0.gotoAndPlay("Location", "Local");
}
I've run out of ideas. I've tried every combination of the above that I can think of and none have worked.
Can anyone help?
-
Ok, the search is working now.
As far as I can tell F8 doesn't handle scenes as well as older versions (weird). So.. I've decided to scrap the scenes and just put everything in the main timeline with lables. That seems to work fine.
Why have scenes if they are nearly useless?
-
Ryan Thomson
good question! the commonly used workaround is to put a frame label on the first frame of each scene named the same as the scene itself.
-
-
Ryan Thomson
Labeling a scene frame does work.. if you can't get it working it's a scope issue. If the first frame of the Location scene has a frame label of 'Location' and you're calling it from inside a movieclip on the the main timeline, then the code below will do that.
on (release) {
_parent.gotoAndPlay("Location");
}
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
|