-
I have created a movie with a series of buttons in them. The buttons each have a gotoAndPlay script on them to make the movie change scenes. I know I have to change the hiearchy from the movieclip to the main movie but everything I try doesn't work.
Here is an example of the main script:
on (release) {
gotoAndPlay("scene2", 1);
}
Here are some examples of hiearchy control of tried to use.
gotoAndPlay("_root.scene2", 1);
gotoAndPlay("_parent.scene2", 1);
gotoAndPlay("_level0.scene2", 1);
Can someone please show me what I am doing wrong??? Thanks in advance.
Chris Czerniak
-
Aye sir
_root.gotoAndPlay("scene2", 1)
try that
-
The script
on (release) {
_root.gotoAndPlay("scene2", 1);
}
Did not seem to work either. When you click on the button in the swf nothing happens where on scipts before it would go back to frame 1 in the movie clip or the entire movie clip would disappear.
Chris Czerniak
-
on(release)
{
_root.gotoAndPlay("Scene 2",1);
}
make sure gotoAndPlay is capitalized properly as the command is case sensitive, and make sure you spell your scene name correctly too, "scene2" is different from "Scene 2", which is flash's default name for your second scene.
-
The script:
on(release)
{
_root.gotoAndPlay("Scene 2",1);
}
Is still not working for me. The "gotoAndPlay" is the right case and my scene is actually called "realestate" but I was calling it scene2 for simplicity. Should I rename all my scenes so they are Scene 1, Scene 2 ex ex.
Chris Czerniak
-
I think it would be a very good idea to call the scenes by their names! Othewise -Why should they listen?
Thomas
Denmark
-
I renamed the scene for the post, not in my fla. Speaking of fla I have decided to post it with my problem. If anyone has a chance to take a look and let me know what I'm doing wrong.
http://www.zianet.com/cczernia/help.html
Thanks again.
Chris Czerniak
-
Senior Member
You can't target scenes in the main timeline from within a movie clip see this link for the reason why http://ed.gamegeared.com/flash/tuts/...gotoandshoveit
instead you should put a frame label on frame 1 of the scene you want to goto and then use
on (release) {
_root.gotoAndPlay("framelabelname");
}
in your movie clip.
-
Thanks Catbert303. This solved the problem which has been haunting me for a week and half.
Chris Czerniak
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
|