loading multiple external swf files
I am trying to load multiple swf files into my flash project. I have it to where it will load one but when i write the code for the others it always loads they same one. here is my code
stop();
btn1.addEventListener(MouseEvent.CLICK,f);
var loader_mc : Loader = new Loader();
var urlRequest : URLRequest = new URLRequest("swf/graphics.swf");
function f(e:Event){
loader_mc.load(urlRequest);
addChild(loader_mc);
}
logos.addEventListener(MouseEvent.CLICK,g);
var myloader_mc : Loader = new Loader();
var myurlRequest : URLRequest = new URLRequest("swf/logos.swf");
function g(e:Event){
loader_mc.load(urlRequest);
addChild(loader_mc);
}
brochures.addEventListener(MouseEvent.CLICK,h);
var myotherloader_mc : Loader = new Loader();
var myotherurlRequest : URLRequest = new URLRequest("swf/BROCHURES/brochures.swf");
function h(e:Event){
loader_mc.load(urlRequest);
addChild(loader_mc);
}
the code for the logos.swf and brochures.swf always loads the graphics.swf. how can i fix this?