3 Replies Latest reply on Jul 29, 2009 4:16 PM by kglad

    broken arrow keys?

    shintashi Level 1

      For some reason, the down and right keys aren't working. They work fine in other programs but in this program they fail. What's going on?

       

       

       

       

      //----------------------------------

      paddle_ybase = paddle._yscale;
      paddleSpeed = 0;

       

      onEnterFrame = function(){

       

      if(Key.isDown(Key.UP)){paddleA._y -= 1;}
      if(Key.isDown(Key.DOWN)){paddeA._y += 1;}                    
      if(Key.isDown(Key.LEFT)){paddleA._x -= 1;}
      if(Key.isDown(Key.RIGHT)){paddeA._x += 1;}                  

       

       

       


      steam(7);
      paddle._rotation = paddleSpeed;

       

      }

       

      function steam(num){
      for(i=0;i<num;i++) {
          var k:MovieClip = boiler.attachMovie("air","air"+i ,boiler.getNextHighestDepth());
          k._y -= Math.random()* (100 + num);   
          k._x += (Math.random()* 10 -5) * (Math.random()* 10 -5);           
              k._rotation += Math.random()* 90 - 45;
          k.gotoAndPlay(Math.ceil(Math.random()*16));   
          k._xscale = k._yscale += Math.random()* 177 - Math.random()* 100;
          if(k.hitTest(paddleA)){paddleSpeed++;}
         
         
          }
      }