Posted By

vdubplate on 02/16/11


Tagged


Versions (?)

Randomly pick a frame on stage


 / Published in: ActionScript 3
 

  1. button_btn.addEventListener(MouseEvent.CLICK, myClickReaction);
  2.  
  3. function myClickReaction (e:MouseEvent):void
  4.  
  5. {
  6. gotoAndStop( Math.ceil(Math.random() * 4) );
  7. trace (currentFrame);
  8. }

Report this snippet  

You need to login to post a comment.