Hey, im wanting to link two swf files together but cant seem to get the code to work out correctly. I've created a button and a function that i want the code to go in to, so that once the button has been clicked it loads the second swf file. I've tried numerous things, such as getURL, loadMovie etc etc but it just doesn't seem to want to work.
first make a loader
var swfLoader:Loader = new Loader;//create a loader object IMPORTANT
var anim:URLRequest = new URLRequest("yourmovieclip.swf");//find the swf
swfLoader.load(anim); //insert the location of the anim in the Loader
swfLoader.y=control the y position of the swf
swfLoader.x = control the x position of the swf
stage.addChild(swfLoader);//add the Loader to the stage in your flash
now to load a second movieclip when you click the button
the even listener for the button
function loadSecond(evt:MouseEvent):void
{
just do the same thing, but make new variables since the other one is being use
var swfLoader2:Loader = new Loader;//create a loader object IMPORTANT
var anim2:URLRequest = new URLRequest("yourmovieclip.swf");//find the swf
swfLoader2.load(anim); //insert the location of the anim in the Loader
swfLoader2.y=control the y position of the swf
swfLoader2.x = control the x position of the swf
stage.addChild(swfLoader2);//add the Loader to the stage in your flash
}
important
make sure you write the write path for the swf
control x and y position in a way that you can see it, sometime if it runs and it doesn't show the swf it's becuz of the x and y position you can use a ruler in the view option to help you