PDA

View Full Version : loadMovie() doesn't work when in HTML


dplows
07-09-2009, 05:17 PM
I have a flash file (main.fla) that contains an empty movie clip which has the action :

loadMovie("myMovie.swf");

When I test the movie in Flash it works fine.
It also works fine when I have Flash closed & just open the (main.swf) file.
And, of course, the loaded movie (myMovie.swf) plays fine too.

HOWEVER, when I embed the main movie file (main.swf) into an HTML page, it will NOT load "myMovie.swf" like it's supposed to.

Note: when I embed "myMovie.swf" into the HTML page, it works fine.



Anyone know why it's doing this?

[Both files are in the same folder]
[I have tried embedding it into a fresh HTML multiple times]

loadlearn
07-09-2009, 05:32 PM
loadMovie("myMovie.swf");

Is the above the exact code you're using?

If so, it's wrong. It should hold a second parameter, which is the empty container movie clip's instance name.

Either:

some_mc.loadMovie("myMovie.swf");

Or:

loadMovie("myMovie.swf", "some_mc");

dplows
07-09-2009, 07:52 PM
The actual code I'm using is....

ctr.loadMovie("speakup1.swf");

dplows
07-09-2009, 07:53 PM
besides, like I said, it's working fine in Flash with no Output Errors

loadlearn
07-09-2009, 09:06 PM
Is the initial .html also in the same folder/directory?

dplows
07-10-2009, 02:12 AM
funny, someone just mentioned that on the kirupa forums......I'm going to try it tomorrow (it's on my other computer).

It must be though....I just didn't consider it besides it was the Flash movie loading another Flash movie. That definitely makes sense.

loadlearn
07-10-2009, 02:23 AM
Guess if someone on the Kirupa forums mentioned it, then it must be true! :rolleyes:

dplows
07-10-2009, 01:30 PM
That's not what I meant, just saying that it's a coincidence

dplows
07-10-2009, 01:52 PM
Problem is solved