A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: -- Random Play --

  1. #1
    Member
    Join Date
    Jan 2003
    Location
    CPU
    Posts
    38

    -- Random Play --

    i put a button "p"...i made 6 keyframe...and in the first frame i put this code

    n=6
    temp = new Array()
    for(i=0;i<n;i++){
    temp[i]=i+1;
    }
    function eagle(){
    k = temp[random(temp.length)]
    for(j=0;j<temp.length;j++){
    if(k==temp[j]){
    temp.splice(j,1)
    }
    }
    gotoAndStop(k)
    }

    p.onRelease = function(){
    (h<n)&&(eagle())||(h++)
    }



    and in another level stop() in the first frame....but it doesn't work.... why??


    thank 4 yer attention!

  2. #2
    Member
    Join Date
    Jan 2003
    Location
    CPU
    Posts
    38

  3. #3
    Member
    Join Date
    Jan 2003
    Location
    CPU
    Posts
    38
    ok

    and what about to say simply to go to a random frame between 1 and 3?

    thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center