I would do a trace inside of your function and see what the e.keyCode is:
when I press "1" on my keyboard, I get 52 in the output window.Code:stage.addEventListener(KeyboardEvent.KEY_UP, playfile); function playfile(e:KeyboardEvent):void { trace(e.keyCode) }
so the if statement would be something like this:
the other issue I can forsee is you are using a timeline command to try and control your flvPlayback component. If you want to play the flvPlayback, just use .play and NOT gotoAndPlay(2);Code:if(e.keyCode==52){ //execute your code here }




Reply With Quote