keylistener = new Object();Now when the next flash file is loaded, I use this bit of code to get rid of the previous flash file.
keylistener.onKeyDown = function() {
if (Key.getAscii() == 51)
loadMovie("tap.swf", "_level1");
};
Key.addListener(keylistener);
unloadMovie("_level0");Now this does work in getting rid of the previous flash file in a visual sense; it dissapears, but the code still remains active. See, I have several other keypress functions in each flash file, so I need to disable/remove/unload the programmed keypresses of the previous scene. Because at the moment I'm getting stuff like this: I'll press a key and move from flash file "tip" to flash file "top," but then I press the Q key, which is meant to make a character pop up in the flash file "top," but it ends up taking me back to the flash file "tip," because that also has coding attached to the Q key.
Phew, hopes this makes sense. I've found out that people can get around this problem when working with buttons and making the buttons disabled...but can you do a similar thing with key presses? Is there perhaps another way to open flash files in the time line other than the LoadMovie code?
Oh, and I'm working in Flash MX Professional 2004
Cheers,
Kyle