loadMovie loads swf into instance1

loadMovie loads swf into instance1

Post by bigstar » Fri, 10 Feb 2006 04:05:45


I must be overlooking something, but I can't understand why loadMovie is
loading my swf into instance1 instead of the parent empty movie clip. How can
I can control an mc if the swf is loading into automatic instance names?

this.createEmptyMovieClip("logo_mc", 1);
logo_mc.loadMovie("test.swf");

To tell test.swf to play frame 10, I have to use:

this.logo_mc.instance1.gotoAndPlay(10);

as opposed to:

this.logo_mc.gotoAndPlay(10);

What am I missing? How can I specify the instance name for instance1?

Thanks.
 
 
 

loadMovie loads swf into instance1

Post by Rothroc » Fri, 10 Feb 2006 04:10:36

As far as I can tell inside your external file "test.swf" you have an un-named
or poorly named instance. There is nothing in the code you have provided to
indicate that the main timeline is aware of any logo_mc.instance1 in existence.

 
 
 

loadMovie loads swf into instance1

Post by pubchu » Fri, 10 Feb 2006 05:05:14

It does appear you are going to frame 10 of an instance within logo_mc. I
would create an test .swf that has a square on frame1 and a circle on frame 2
(bare bones with stop(); in each frame). Try controling this first, then build
towards your final goal.

I am having a problem loading .jpg's using loadMovie();....I want a new .jpg
every 3sec, but I get kicked out of my onEnterFrame() loop as soon as the first
.jpg is loaded.

this.onEnterFrame = function()[
this.empty_mc.loadMovie(x+".jpg", "_level1");
}

How can I continuously load external .jpg's?
 
 
 

loadMovie loads swf into instance1

Post by bigstar » Fri, 10 Feb 2006 05:16:12

I tried loading a different swf that I didn't create and I wasn't getting any
automatic instance name problems.

I've been creating my swf's by right-clicking on a movie clip in my library
and choosing "export flash movie", could this be the cause of my problem? Is
there a better way to export movie clips?
 
 
 

loadMovie loads swf into instance1

Post by bigstar » Fri, 10 Feb 2006 05:20:29

I just created an entirely new fla and published it, then used loadMovie to
load that swf without any problems. Why does publishing a seperate FLA work,
while using "export flash movie" from the library cause problems?
 
 
 

loadMovie loads swf into instance1

Post by Rothroc » Fri, 10 Feb 2006 05:55:59

Just when you think you have seen every combination of "You did what?"

It had never occurred to me that you would be making swfs that way. Evidently
that is how it works ? by wrapping it in an instance of whatever it is.

In any event the publish function for the FLA is the preferred way to
publish/compile your swfs so you probably should stick with it.