# Problems with loading in swf files

**URL:** <https://forum.kirupa.com/t/problems-with-loading-in-swf-files/159244>\
**Category:** flash\
**Created:** [August 16, 2005, 12:59am UTC](https://forum.kirupa.com/t/problems-with-loading-in-swf-files/159244 "2005-08-16T00:59:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NovaCaine](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@NovaCaine](https://forum.kirupa.com/u/NovaCaine)\
**Post date:** [August 16, 2005, 12:59am UTC](https://forum.kirupa.com/t/problems-with-loading-in-swf-files/159244/1 "2005-08-16T00:59:23Z")

</div>

im trying to load in a different swf file depending on which key the users pressed, but i can only ever load one in before having to quit.

heres my code:

```auto

onClipEvent(enterFrame) {
	if( Key.isDown(49) ) {
		this.unloadMovie()
		this.loadMovie( "Sanyo-3DmapSim scene01.swf" )
	}
	if( Key.isDown(50) ) {
		this.unloadMovie()
		this.loadMovie( "Sanyo-3DmapSim scene02.swf" )
	}
	if( Key.isDown(51) ) {
		this.unloadMovie()
		this.loadMovie( "Sanyo-3DmapSim scene03.swf" )
	}
	if( Key.isDown(52) ) {
		this.unloadMovie()
		this.loadMovie( "Sanyo-3DmapSim scene04.swf" )
	}
	if( Key.isDown(53) ) {
		this.unloadMovie()
		this.loadMovie( "Sanyo-3DmapSim scene05.swf" )
	}
}

```

this is on a movieclip on my main timeline. is that the problem, should i be creating an empty MC everytime i load a swf then destroy it before loading the next one??

Any help would be great
