A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: goto a random label

  1. #1
    Junior Member
    Join Date
    May 2006
    Posts
    4

    goto a random label

    hi, i have a multiplayer games for two users created with electroserver (based on the tic tac toe example)

    There are two boxes on screen, each user can only click one box.
    user 1 is x's and user 2 is 0's

    insetad of showing the x and o on the screen i have a random code which is supposed to show a number 1, 2 or 3

    the user with the highest number wins

    the problem i have is that my random code does not work properly the random code is located on the 0 and x label and should goto another label

    i have the following so far which sometimes works

    gotoAndStop("label"+random(3));

    my label are called:

    label1
    label2
    label3

    sometimes it will still display the 0 and x frame..... am i correct in thinking that

    gotoAndStop("label"+random(3));
    goto and stop label1 or label2 or label 3
    Last edited by oo0oo0; 05-13-2006 at 08:46 AM.

  2. #2
    gotoAndStop(["label"+random(3)]);
    FuzzGtp

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