A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Help please!!!

  1. #1
    iguanagirl32 mraspiller's Avatar
    Join Date
    Jul 2002
    Posts
    817
    I am making a hang man game...I have it working except for the part where the man is "built" based on a wrong guess. I have the man in a separate MC, & he each body part is in a seperate frame in that MC. Here is the code I am using to make him appear, but it's not working...what am I doing wrong? This code sits on the last frame of the "wrong answer" MC (which pops up if they have a wrong guess....

    _root.score = _root.score+1;
    if (root.score == 2)
    _level1.hangman.gotoAndPlay(2);
    if (root.score == 3)
    _level1.hangman.gotoAndPlay(3);
    if (root.score == 4)
    _level1.hangman.gotoAndPlay(4);
    if (root.score == 5)
    _level1.hangman.gotoAndPlay(5);

    if (_root.score > 4)
    _root.loadMovie("gameover.swf",0);

  2. #2
    Denim Demon
    Join Date
    Jun 2002
    Location
    Outside of society
    Posts
    514
    Did you leave out the underscore in your 'if' statements?

  3. #3
    iguanagirl32 mraspiller's Avatar
    Join Date
    Jul 2002
    Posts
    817
    not sure what you mean...the code in my movie is exactly how I posted it...

  4. #4
    Denim Demon
    Join Date
    Jun 2002
    Location
    Outside of society
    Posts
    514
    Well, I noticed that you wrote:
    if (root.score == 2)

    Instead of
    if (_root.score == 2)

    Don't you need the underscore before the word 'root'?
    Or does that not make a difference?

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