Loading movies into one .swf

o.k im a noob to flash and actionscript so this question is proberly very simple…

i have a .swf file that i want to be in another movie, so i can reduce the loading time of the main movie is there any simple way i can do this useing actionscript:q: 

thanks alot :cowboy:

Yup, you’ll need to use the loadMovie action, here’s a tutorial.

http://www.kirupa.com/developer/mx/full_site.htm

hmm…

is there anyway of doing that but without a button so it just loads there strait away?

please help ;(

make a blank mc give it these actions:
on(release){
loadMovieNum("yourmovie.swf,1);
}

i tryed useing those actions but i didnt work :frowning:

flying monkey: that script will indeed work however i must appologize, i gave the wrong script :frowning:

do this:
create a blank mc and give it theese actions:

onClipEvent(load){
loadMovieNum(“your.swf”,1);
}

this will load your initail .swf with out having a button call it.

try agian, i promise that works :0

oh and dont forget to drag that blank mc to the stage

You don’t really need to place it in a event handler, you can just place the loadMovie onto a frame so when that frame is played, it will load the movie. So on a frame just place the loadMovie script:[AS]loadMovieNum(“your.swf”,1);[/AS]

good point electron :slight_smile:

o.k its working but there is still one proberlem even know the movieclip is near the bottem of the page the seprate .swf is loading at the top
how can i change this so it loads were i want it to?

go into your .swf that is loading and place in on the page where you want it to be loaded. a good way to do this is to copy and past your swf into your index.swf and postion it o where it shoudl be. then cut and paste into the swf which shoudl be loading. you can also use targeting but i choose not to becuase i find the other way more effective

sorry i dont understand what you mean, could you explain it another way

Here’s another way of doing that is probably easier. This script will create a empty movieclip on the maintimeline so that you can load your movie into. It will also position the movie where ever you want it to be by defining the x and y locations.[AS]_root.createEmptyMovieClip(“container”, 1);
loadMovie(“your.swf”, “container”);
container._x = 200;
container._y = 300;
[/AS]

Container is the instance name of the empty movieclip that is created. Just plug in different numbers for the x and y until you get the desired postion.

o.k… this is strange

i have done exactly what you said, there are no errors in the actionscript, but there is no sign of the seprate .swf :frowning:

Try this and check your x and y cordinates to see if it didn’t load off the area of your movie. x =0 and y =0 would be the top left corner of your movie.

thanks :cowboy:

its working now :smiley:

no problem =)