Quantcast

Controlling a parent movie from a child movie in flash

kenyabob's picture

I have a blank index page that loads and when it does, it loads a separate swf for the first page. On this page, each button has a command similar to this:

on (release) {
loadMovie("page2.swf", "_root.mc");
}

This then swaps out the main page for the second page in the master timeline. However, once I get to the second page, all the links fail to swap out the swf for other swfs. If I change the order (loading page2 before the main page) than the links on page2 will work but the main page ones will not!

I don't understand why I only get to swap the main timelines movie just once. Is it something in my code?

jesscampbell's picture

Could be...

On the first frame of your page2.swf put this frame action:
trace( this );
And publish to the swf.

Then run your main program. When you load your page2.swf into the _root.mc movieclip, the output window will come up telling you the direct path to the first frame of that clip. It should look something like:
_level0.mc.(clip instance)

That might help you in your scope for what on( release ) actions you put on those buttons.
If you need help, send me an email at and I could have a quick peek for you. I'm a fulltime flasher, so I should be able to figure it out pretty quickly.

Good luck.

User login

Partner With Us













Latest critique

Time Out