# SetTimeout + Parameters question. Thanks!

**URL:** <https://forum.kirupa.com/t/settimeout-parameters-question-thanks/285342>\
**Category:** Uncategorized\
**Created:** [March 30, 2009, 7:59pm UTC](https://forum.kirupa.com/t/settimeout-parameters-question-thanks/285342 "2009-03-30T19:59:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![humbucker](https://avatars.discourse-cdn.com/v4/letter/h/278dde/32.png) [@humbucker](https://forum.kirupa.com/u/humbucker)\
**Post date:** [March 30, 2009, 7:59pm UTC](https://forum.kirupa.com/t/settimeout-parameters-question-thanks/285342/1 "2009-03-30T19:59:39Z")

</div>

Hello,

I’m working on a external swf loading process with preloader, in short what I want to achieve is to display a clip on top of my current loaded swf before unload it from the stage (while loading the next one)

I’m using this :

For buttons, let’s say I got this :

```auto
btn_array[ix].addEventListener(MouseEvent.MOUSE_DOWN, changeContent);

```

For the loading process :

```auto

    private function changeContent(m:MouseEvent):void
    {
        globalContainer.addChild(preloader);
        globalContainer.setChildIndex(preloader,2);
        Tweener.addTween(preloader, {alpha:1, time:0.2, transition:"linear"}); 
        id=m.target.id; // we stock the id of the clicked button    
        loader.unload();  
        globalContainer.removeChild(loader);                                     
        removeListeners(loader.contentLoaderInfo);                                
        loadAnotherSWF(id);
    }

```

Can you tell me how I can temporize the (loader.unload) process so that I have the time to hide my swf before fully unloading it.

Hope I’m clear enough

Thank thank thank you!!!
