Using KeyboardEvent to navigate through scenes in Flash AS 3.0 without inherited script -


i making simple animation made of 5 looping scenes. want use keyboardevents procede next scene. far have put following code in scene 2;

stage.addeventlistener(keyboardevent.key_down, plutofl_keyboarddownhandler);  function plutofl_keyboarddownhandler(event:keyboardevent):void {   if(event.keycode == keyboard.q) {     gotoandplay(1, "scene 3");    }   else if (event.keycode == keyboard.w) {     gotoandplay(1, "scene 1");    } } 

the animation advances scenes fine go inherits action scene has left , gets stuck. there simple way keep action script current scene?


Comments

Popular posts from this blog

java - unable show chart in xls document using jasper reports -

javascript - How to change image src on success AJAX -

java.lang.RuntimeException: Could not generate dummy secret at sun.security.ssl.RSAClientKeyExchange.<init> -