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:
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]
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
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.
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.