1 Reply Latest reply on Dec 2, 2009 1:47 PM by MariusVMiliunas

    Conditional Statement problem

    MariusVMiliunas Level 1

      I'm trying to get it so whenever the object is clicked it reduces in opacity by 10% each time, and if it gets to 10% and it's clicked again it stays at 10% instead of going to 0

       

      I got it to keep going down in opacity fine I just don't know the code to keep it from going lower. this is what I have so far

       

      function fadeOut(e:MouseEvent):void {

      instrument.alpha -= .1;

      }

       

      if (instrument.alpha<.1) {

      instrument.alpha = .1

      } else {

      instrument.alpha -= .1;

      }