3 Replies Latest reply on May 5, 2011 3:52 AM by aneelbakshi

    Why wont my ship move right?

    DanJakeNeal

      I am following this tutorial and i have got to step 9.

      http://www.kongregate.com/games/Kongregate/shootorial-1

       

      I have made a file called Ship.as with this code in.

       

      class Ship extends MovieClip
      {
          var speed;
         
          function onLoad()
          {
          speed = 10;
          }
         
          function onEnterFrame()
          {
          if (Key.isDown(Key.RIGHT))
          {
              _x = _x + speed;
          }
         
          }
      }

       

      When i test the SWF nothing happens. The ship just sits in the top left corner doing nothing. I am getting no errors so can anyone help me fix this?

       

      Thanks.