7 Replies Latest reply on Mar 11, 2014 6:38 AM by kglad

    On button press, increase number by 1

    KarinaSkarina

      Hello everyone..I hope You can help me out with this thing again

       

      So im working on AS2 and I have the following things :

       

      a dynamic text field with instance name "pressure" with number 50

      a button with instance name "but_up" that on press has to increase the number 50 by one.

      and a button with instance name "but_down" that would have to decrease the number 50 by one.

       

       

      How it looks : Picture1.png

       

       

      So far I have this code, that isnt working... :

       

       

      var count:Number = 50;

      but_augsu.onRelease = function()

      {

      count++;

      trace(count);

      pressure.text = count;

      }

       

       

      Could You help me with this problem? Any ideas what could be wrong?