# Unload Movie

**URL:** <https://forum.kirupa.com/t/unload-movie/275748>\
**Category:** Uncategorized\
**Created:** [November 18, 2008, 9:41am UTC](https://forum.kirupa.com/t/unload-movie/275748 "2008-11-18T09:41:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![snowmiu19](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@snowmiu19](https://forum.kirupa.com/u/snowmiu19)\
**Post date:** [November 18, 2008, 9:41am UTC](https://forum.kirupa.com/t/unload-movie/275748/1 "2008-11-18T09:41:40Z")

</div>

Hello there,

i was fiddling with the AS3 script the other day and must say it was a new way of coding. really having a tough time. what im trying to do is having one music load on the first frame:

var myLoader:Loader = new Loader();  
var [url:URLRequest](http://www.kirupa.com/forum/URLRequest) = new URLRequest(“music1.swf”);  
myLoader.load(url);

But when i click on a button i want the music to change and load another tune but seems it clash. i do not know wat to type to unload the movie. my code is here:

stop();

myButton.addEventListener(MouseEvent.CLICK, buttonClick);  
function buttonClick(event:MouseEvent):void{

var myLoader:Loader = new Loader();  
var [url:URLRequest](http://www.kirupa.com/forum/URLRequest) = new URLRequest(“music2.swf”);

myLoader.load(url);  
gotoAndPlay(108);  
};

Anyone can solve this problem :P?

Thanks in advance guys…
