actionscript 3 - ActionScript3. The screen auto change after a time -
i'm newbie in as3 , have stuck while coding pause , un-pause. @ frame 20
stage.framerate=0; stage.addeventlistener(keyboardevent.key_up, wait); function wait(event:keyboardevent) { if(event.keycode == 40) { //resume pause return framerate = 20 stage.framerate = 20; event.currenttarget.removeeventlistener(keyboardevent.key_up,wait); } }
i dont' know why after wait 10 second, screen contain code automatic change frame 21
framerate's value
adobe mentions 0 can't framerate's value:
valid range frame rate 0.01 1000 frames per second.
that means framerate's value of 0.01, flash movie play 100 seconds later.
gotoandstop()
the stage framerate's property not intended stop movie @ frame, , set frame rate of stage.
if want stop
flash movie , wait frame 20:
gotoandstop(20);
if want play
:
play();
Comments
Post a Comment