# Loader class help

**URL:** <https://forum.kirupa.com/t/loader-class-help/308306>\
**Category:** Uncategorized\
**Created:** [April 20, 2010, 7:42pm UTC](https://forum.kirupa.com/t/loader-class-help/308306 "2010-04-20T19:42:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![billy\_brown](https://avatars.discourse-cdn.com/v4/letter/b/f6c823/32.png) [@billy\_brown](https://forum.kirupa.com/u/billy_brown)\
**Post date:** [April 20, 2010, 7:42pm UTC](https://forum.kirupa.com/t/loader-class-help/308306/1 "2010-04-20T19:42:39Z")

</div>

Im using:  
ActionScript Code:  
//  
var myLoader:Loader = new Loader(); addChild(myLoader);  
var url:URLRequest = new URLRequest(“contact\_form.swf”);  
myLoader.load(url);  
To load an SWF. I have set it so it loads when i click on my contact button the swf is a contact(form) and it loads fine. However when i click on any of the other navigation buttons the contact form is still there.

Here is my as  
ActionScript Code:  
//  
stop();  
btn1\_btn.addEventListener(MouseEvent.CLICK,showimage1);  
function showimage1(event:MouseEvent):void {  
gotoAndPlay(“label1”);  
}  
btn2\_btn.addEventListener(MouseEvent.CLICK, showimage2);  
function showimage2(event:MouseEvent):void {  
gotoAndPlay(“label2”);  
}  
btn3\_btn.addEventListener(MouseEvent.CLICK, showimage3);  
function showimage3(event:MouseEvent):void {  
gotoAndPlay(“label3”);  
}  
btn4\_btn.addEventListener(MouseEvent.CLICK, showimage4);  
function showimage4(event:MouseEvent):void {  
gotoAndPlay(“label4”);  
}  
btn5\_btn.addEventListener(MouseEvent.CLICK, showimage5);  
function showimage5(event:MouseEvent):void {  
gotoAndPlay(“label5”);  
}  
btn6\_btn.addEventListener(MouseEvent.CLICK, showimage6);  
function showimage6(event:MouseEvent):void {  
gotoAndPlay(“label6”);  
}  
btn\_7.addEventListener(MouseEvent.CLICK, clickFunction);

function clickFunction(evt:MouseEvent):void {  
gotoAndPlay(“label6”);  
}

import fl.video.VideoEvent;  
lightbulb.autoRewind = true; // fl\_video being the name of the video component  
lightbulb.addEventListener(VideoEvent.AUTO\_REWOUND, doLoop);  
lb.autoRewind = true; // fl\_video being the name of the video component  
lb.addEventListener(VideoEvent.AUTO\_REWOUND, doLoop);  
function doLoop(e:VideoEvent):void  
{  
e.target.play();  
}  
Many thanks in advance
