A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Random guessing game - actionscript error

Threaded View

  1. #1
    Junior Member
    Join Date
    Oct 2004
    Posts
    5

    Random guessing game - actionscript error

    Hi, im new to these forums. I'm making a guessing game - when you press one of three buttons, this script executes:

    code:

    on (release)
    {
    _root.win=0;
    _root.win=random(2);

    if (_root.win=0);
    { gotoAndStop(3); } //Lose

    if (_root.win=1);
    { gotoAndStop(4); } //Win
    }



    The problem is that the player always wins. Where is the error?
    Last edited by jbum; 10-09-2004 at 02:12 PM.

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