Skip to main content
Participant
February 2, 2011
Answered

load movie and goto frame in root

  • February 2, 2011
  • 2 replies
  • 1305 views

Hello,
I'm hoping someone here can help me. I have an swf with a menu button that loads an external swf:          on(release) {
    loadMovie("Unit-Type.swf",_root.MC_UnitTypes);
}


When that menu movie is loaded I want to be able to click a button and have it go to a certain frame in the root movie and close itself. I have this code but it's not working:    on(release){
        _root.gotoAndPlay(25);
}

This topic has been closed for replies.
Correct answer Ned Murphy

Here's a link to two files I created to test your code based on the description of what you wanted.  See what you can find that is different from what you did.  The file with the 2 in its name is the main file.

http://www.nedwebs.com/Flash/open2.zip

The names of the files are not intended to offend... They're named just to be easy reminders for me to delete them from my system come the next time I do so.

2 replies

Known Participant
February 3, 2011

try this

_root.gotoAndPlay("Scene 1", 25); or whatever your first scene is called

Ned Murphy
Legend
February 2, 2011

What is not working?  As long as you don't have a _lockroot set that should cause the main file to go to frame 25.

Participant
February 2, 2011

I agree, it should work, but nothing happens at all.

Ned Murphy
Legend
February 2, 2011

Not much I can offer.  If I use your code, it works fine for me.