insert swf into fla

Associate
Joined
1 Nov 2004
Posts
139
insert swf into fla dynamically

hi, i created a game in flash which has a pre-loader infront of it, now i already have my flash made portfolio website underway but im trying to insert this game into it dynamically but not sure how to insert it, can it be done?

thanks in advance

Stav
 
Last edited:
loadMovie();

basic example..
Code:
//create an empty movieClip symbol
this.createEmptyMovieClip("mcHolder", 15);
// set it's position on the stage
mcHolder._x = 40;
mcHolder._y = 40;
//to load the swf into the empty movieClip.
mcHolder.loadMovie("mygame.swf", this);

if you then called
mcHolder.loadMovie("anothergame.swf", this);
it would remove mygame.swf from within mcHolder and load anothergame.swf in it's place :cool:

at gotoandlearn.com, around the 10th tute down on the left hand menu you'll find an example of the movieClipLoader method. a much better method over the long run. one preloader for all imported files rather than one for each.

this is what you ment wasn't it? as you say you created a game i wonder if i've got the wrong end of the stick.
 
yeah basically i have a game (swf file) and already have a flash website with a preloader at the beginning, and i want to have the game dynamically loaded in so it doesnt get preloaded at the beginning, will give ta code a bash later thanks!


Stav
 
Back
Top Bottom