HI all!!
I have a problem. I load a SWF on my flash application on frame 133 with this code:
this.createEmptyMovieClip("load",0);
loadMovie("teste.swf", load);
load._x = 80.0;
load._y = 300.0;
load._xscale = 80;
The first time it loads, i can press the RIGHT arrow key and it will continue to play the SWF, but when i press the LEFT arrow key, it won’t play the SWF’s LEFT arrow key event,but it plays the LEFT arrow key of the main timeline, because i have a key listener in the main timeline to go foward or back pressing the arrow key. How can i solve this problem?? help me please. thanks in advance.
here is the code for the key listener
// this is the object that will listen, #1
var keyListener:Object = new Object ();
// this is what the object will do
keyListener.onKeyDown = function ():Void {
trace("keyGode: " + Key.getCode());
if (Key.getCode() == 37 ) { // left arrow
_root.gotoAndStop(2);
}
if(Key.getCode () == 39 ){ // right arrow
_root.gotoAndStop(3); }
}
// tell the object what to listen for
Key.addListener(keyListener);