1 Reply Latest reply on Nov 25, 2009 9:50 AM by kglad

    Conditional statement not working properly on button

    Andymc7 Level 1

      Ok, this one is driving me batty...


      I'm almost finished with my "Wheel of Fortune" style game, and this one thing is holding me up:


      Here is my current small piece of code I have on a given "letter" button..


      on (release) {
          if (_root.Acheckmark._visible=true) {
              _root.AScore = _root.AScore+_root.APoints;
          } else if (_root.Bcheckmark._visible-true) {
              _root.BScore = _root.BScore+_root.BPoints;


      "Acheckmark" and "Bcheckmark" are movie clips that determine which team is currently playing, based on their visibility.

      "AScore" and "BScore" are variables attached to two text fields that contain either team's score.

      "APoints" and "BPoints" are variables that hold the current value that the wheel has stopped on after it has spun.


      As of now, whether I move the checkmark to the A or B side, the current points are always awarded to Team A, and the checkmark moves to that side. How can I award the correct points to the correct team?? As always, any help will be greatly, greatly, appreciated.


      Here is what happened after clicking the "E" letter button (the wheel had stopped on 500).


      As you can see, the button caused the team A checkmark to appear, and awarded the points to team A.??