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

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -