[quoted text, click to view] > _root.createEmptyMovieClip("mc",1); > loadMovie("img/arrow1.GIF",mc);
I'm curious, shyaway, why you seem to prefer the loadMovie() function over the MovieClip.loadMovie() method. Not objecting -- just curious. David stiller (at) quip (dot) net Dev essays: http://www.quip.net/blog/ "Luck is the residue of good design."
When I load an external movie clip using loadMovie, or the MovieClipLoader class, there is always a subclip named "instance" followed by an instance number attached to whatever clip I am loading the external swf into. For instance, I have a clip on the stage called "container". I load an external clip like this: container.loadMovie("clip.swf"); "clip.swf" ends up in container.instance01, rather than container. Is there a way to load a clip into container, the same way using attachMovie with a local library clip would?
Still ends up as "instance1" within the "container" clip.
Because this is the way you have made it. Every movieclip has an instance name. If you don't assign one then Flash just starts instance1, instance2, etc. So obviously in your clip.swf there is a clip at the top level containing all your content and you haven't given it a name. I've seen this before, but can't quite recall the crazy thing you are doing that none of us here would ever think of. Something like, you aren't exporting or publishing from the file menu ? instead you are doing some export directly from the library?
_root.createEmptyMovieClip("mc",1); loadMovie("img/arrow1.GIF",mc); for (var i in mc){ trace(i); } //no output for (var i in _root){ trace(i); } //output: $version // mc so, you wanna post some of your codes and see where the problem is?
just a personal perference, i guess.
<blockquote>quote:<br><hr><i>Originally posted by: <b><b>Rothrock</b></b></i> Because this is the way you have made it. Every movieclip has an instance name. If you don't assign one then Flash just starts instance1, instance2, etc. So obviously in your clip.swf there is a clip at the top level containing all your content and you haven't given it a name. I've seen this before, but can't quite recall the crazy thing you are doing that none of us here would ever think of. Something like, you aren't exporting or publishing from the file menu ? instead you are doing some export directly from the library?<hr></blockquote>
<blockquote>quote:<br><hr><i>Originally posted by: <b><b>Rothrock</b></b></i> So obviously in your clip.swf there is a clip at the top level containing all your content and you haven't given it a name. I've seen this before, but can't quite recall the crazy thing you are doing that none of us here would ever think of. Something like, you aren't exporting or publishing from the file menu ? instead you are doing some export directly from the library?<hr></blockquote> That was the problem! I was exporting the swfs directly from the library. For some reason when you export a movie directly from the library and then load it into another clip a generic instance name is created on top of the clip you are loading it into. When you publish a clip normally and load it into another clip, it retains the instance name. Problem solved, thanks!
Glad that worked out. I would expect the generic instance is there regardless of if you load into another clip or not ? you just don't notice it otherwise! But then again, "If a tree falls in the forest?"
Don't see what you're looking for? Try a search.
|