# URGENT ! AS3 : Unloading a successfully loaded swf

**URL:** <https://forum.kirupa.com/t/urgent-as3-unloading-a-successfully-loaded-swf/283081>\
**Category:** Uncategorized\
**Created:** [March 2, 2009, 2:54pm UTC](https://forum.kirupa.com/t/urgent-as3-unloading-a-successfully-loaded-swf/283081 "2009-03-02T14:54:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![surf](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@surf](https://forum.kirupa.com/u/surf)\
**Post date:** [March 2, 2009, 2:54pm UTC](https://forum.kirupa.com/t/urgent-as3-unloading-a-successfully-loaded-swf/283081/1 "2009-03-02T14:54:28Z")

</div>

Hi… i am currently workin on a flash website…  
erm

the following works perfectly fine

```auto

 import flash.events.*;
    import flash.display.Loader;
    import flash.net.URLRequest;
    import flash.display.MovieClip;

        var req:URLRequest = new URLRequest( "main.swf" );
        var loader:Loader = new Loader();

            loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);
            loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
            loader.load(req);
			
			
			
       function loadProgress(event:ProgressEvent):void
        {
            var percent:Number = ( 100 / event.bytesTotal ) * event.bytesLoaded;
            
           trace( percent);
        }
 
         function loadComplete(event:Event):void
        {
            trace("Complete!");
           border_mc.addChild(loader);
		 
        }

```

how can i unload the current loaded swf when moving on to another frame?  
kind regards  
surf
