A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: goto random frame lable

  1. #1
    Senior Member
    Join Date
    Jul 2006
    Location
    Fukushima, Japan
    Posts
    159

    goto random frame lable

    This is probably so basic it is laughable but I would like to have a
    "gotoAndStop("FrameLable_1")" frame lable be a random choice of two different lables. example frame "right" and frame "wrong".
    How can I write this?

    Cheers

    Mark

  2. #2
    Senior Member Shotsy247's Avatar
    Join Date
    Apr 2001
    Location
    Be there in a minute!
    Posts
    1,386
    So you want to randomly go to one of two frames? Right or wrong?

    Frame 1 = wrong

    Frame 2 = right

    code:
    var myNum:Number = Math.round(Math.random());
    gotoAndStop(myNum + 1);



    _t
    I don't feel tardy.

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