1 Reply Latest reply on Aug 8, 2013 6:41 AM by kglad

    How can I make him fall if the up key isn't being held? AS2?


      Here is the code of my guy that will jump and (even if you let go of the key) will fall down after a certain period of air time.


      jumping_var = true
      if (jumping_var == true)
      this._y +=jumpSpeed_var;
      jumpSpeed_var +=1;
      if (this._y >=300)
      jumping_var = false;
      jumpSpeed_var = -20;


      How can I increment it so that when you let go of the key he starts too fall?
      I tried by using if(!Key.isDown(Key.UP)) but that didn't work.. Please help



      Also I am having a moving movieClip in the back and want it to keep rolling through, how can i get it to keep attaching (I tried resetting i to 0 but wasnt working for me, id rather no have (i=o;i<1000000;i++)



                _root.attachMovie("ground","mc_ground" + i, _root.getNextHighestDepth())

                _root["mc_ground"+i]._y = 400

                _root["mc_ground"+i]._x = i*1132

                _root["mc_ground"+i].onEnterFrame = function(){

                          this._x -= groundSpeed_var;

                          if(this._x < -1*1000){


        ****(TRIED i=0)


        ****(TRIED if(i >=1)  i=0)





      let me know if im not clear, usually the case