# Final Packaging Help

**URL:** <https://forum.kirupa.com/t/final-packaging-help/328185>\
**Category:** flash\
**Created:** [April 24, 2012, 10:22pm UTC](https://forum.kirupa.com/t/final-packaging-help/328185 "2012-04-24T22:22:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rimacy](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@rimacy](https://forum.kirupa.com/u/rimacy)\
**Post date:** [April 24, 2012, 10:22pm UTC](https://forum.kirupa.com/t/final-packaging-help/328185/1 "2012-04-24T22:22:30Z")

</div>

Right now I have my preloader in a swf and my game in another swf. I need to get them into one swf.

Right now I have a preloader with actions in frame 1 like so:

```auto
var l:Loader=new Loader();var played:Boolean=false;
var sGulagSound:Sound=new sunnyGulagSound();
var sGulagSoundChannel:SoundChannel=new SoundChannel();
var sulagSoundTransform:SoundTransform=new SoundTransform();
l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,loop);
l.contentLoaderInfo.addEventListener(Event.COMPLETE,done);
l.load(new URLRequest("MVCSpringBeauty12512.swf"));

function loop(e:ProgressEvent):void
{
    
    var perc=e.bytesLoaded/e.bytesTotal;
    if(perc>.75&& played==false)
    {    
        sulagSoundTransform.volume=.1;
        sGulagSoundChannel.soundTransform=sulagSoundTransform;
        
        sGulagSoundChannel=sGulagSound.play();
        played=true;
    }
    ProgBar.scaleX=perc;
}

function done(e:Event):void
{ while(numChildren >0)
    {
        removeChildAt(0);
    }
    trace(numChildren)
    addChildAt(l,0);
    
}

```

This works but still always requires that the main swf be in the folder. Is there a way to publish one SWF with both preloader and main swf in one swf ???
