Quote Originally Posted by PlenaryCreation
Try something like this:

PHP Code:
package
{
    
import flash.display.Sprite;
    
import flash.events.KeyboardEvent;
    
import flash.ui.Keyboard;
    
    public class 
KeyCodes extends Sprite
    
{
        protected var 
ball:Sprite;
        
        public function 
KeyCodes()
        {
            
init();
        }
        protected function 
init():void
        
{
            
ball = new Sprite();
            
addChild(ball);
            
ball.graphics.beginFill(0xff0000);
            
ball.graphics.drawCircle(0040);
            
ball.graphics.endFill();
            
ball.stage.stageWidth 2;
            
ball.stage.stageHeight 2;
            
stage.addEventListener(KeyboardEvent.KEY_DOWNonKeyboardEvent);
        }
        protected function 
onKeyboardEvent(event:KeyboardEvent):void
        
{
            switch(
event.keyCode)
            {
                case 
Keyboard.UP ball.-= 10;
                break;
                
                case 
Keyboard.DOWN ball.+= 10;
                break;
                
                case 
Keyboard.LEFT ball.-= 10;
                break;
                
                case 
Keyboard.RIGHT ball.+= 10;
                break;
                
                default : break;
            }
        }
    }

Good luck.
Thanks for the input, but I get the following error: 1037: Packages cannot be nested.