-
loading external movies into layer 1 on load
I have a movie that i load other movies into or onto. Main movie is layer 0 and all others are loaded on layer 1.
when layer 0 starts I want one of these external files to load automaticly on load up of layer one.
Any ideas how to do that?
To get an idea what im doing go to http://www.devilsarmada.com
thanks in advance
Use no way as way and no limitation as limitation.
"Bruce Lee"
-
On the very first frame of the main movie, code:
Code:
if (FlagFirstTime == undefined)
{
loadMovieNum ("external.swf",1);
FlagFirstTime = true;
}
-
Thanks
Thank you very much. I've been learning actionscript slowly but surely.
Use no way as way and no limitation as limitation.
"Bruce Lee"
-
after this movie is loaded how do you reach the attributes like changing _x and _y ?
-
put an empty movie clip on layer 1, name it, and use
movieClipName.loadMovie("external.swf")
then you can access it by movieClipName._x or movieClipName._y
-
-
mmm i need to load the movie in 5 using the loadmovienum and then set the x and y.
i am restricted to using flah player 6 and earlier
movieClipName.loadMovieNum("external.swf",5);
Last edited by gverner; 09-08-2005 at 07:03 AM.
gr verner
-
More Help
if (FlagFirstTime == undefined)
{
loadMovieNum ("external.swf",1);
FlagFirstTime = true;
}
this worked for me greatly but out of curiosity, is there a way to make it time delayed so that it does not load immediatle?
Use no way as way and no limitation as limitation.
"Bruce Lee"
-
if you load a movie into a level, you have no control over its attributes like _x, _y, _xscale, etc. A better way is to create an empty movieclip on the stage, then you can load your external movies into that, one at a time, or you can create an empty movieclip for each of the external clips and load from there.
Now, let's say you create an MC on the stage called a_mc:
this.createEmptyMovieClip("a_mc",20);
Then, you want to load an external clip into it, but you don't want it to show up on the stage yet, so you move that clip way off the stage so it won't show up until you move it back into position:
a_mc._x = -800;
a_mc._y = -600;
a_mc.loadMovie("external_0.swf");
Finally, after it's loaded and you're ready for it, you put it back into position and tell it to start playing at the beginning:
a_mc._x = 0;
a_mc._y = 0;
a_mc.gotoAndPlay(1);
For further study, look up the MovieClipLoader class in the flash help. It's a nice, built-in class that allows you to specify a bunch of things to load and functions that will run when each one is complete, or as each one is progressing.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|