Posted By

hejaaa on 03/31/11


Tagged

random animation movieclip


Versions (?)

play random frame in movieclip


 / Published in: ActionScript 3
 

  1. function playRandomAnim(frames:uint):void {
  2. var rand:uint = 1 + (Math.random() * frames);
  3. if (num == rand){
  4. playRandomAnim(frames);
  5. } else {
  6. num = rand;
  7. gotoAndPlay(rand);
  8. }
  9. }

Report this snippet  

You need to login to post a comment.