loadMovie Question

Hey.

I am working with Flash MX. I am creating a site with a Main.fla which contains buttons to load other SubPage.swf files. For example, I have a Page1 button with the following actionscript code.

on (release) {
_root.contents.loadMovie(“page1.swf”);
}

It works fine.

Now when I work on the Page1.fla, I am trying to load other Movies in the same fashion. It works when I CMD+RETURN to generate the .swf file.

However when I CMD+RETURN the Main.fla file and load the Page1 file, the buttons won’t load the movies.

Is this a Target Path issue? How would I remedy this?

Thanks.

Yeah, it surely is a targetting issue. Try using relative addressing. :slight_smile:

http://www.kirupa.com/developer/actionscript/tricks/relativeaddressing.htm

Thanks for the info, but I am still a little confused.

Here are the files I have:

Main.fla
Page1.fla

Where do I place [COLOR=blue]_global.myAppMain = this;[/COLOR] ?
On Frame 1 of the main timeline of Main.fla or Frame 1 of the main timeline of Page1.fla?

And what code do I attach to my button on Page1.fla?

Would it be

on (release) {
_global.myAppMain.loadMovie(“mySubPage.swf”);
}

Thanks.