working with objects
code
// pfa task06 :: justin grossman//code taken from examplefunction UserControl() {} UserControl.onKeyUp = function() { var code = Key.getCode(); switch(code) { case Key.DOWN : joe.setDirection("SOUTH"); break; case Key.UP : joe.setDirection("NORTH"); break; case Key.LEFT : joe.setDirection("WEST"); break; case Key.RIGHT : joe.setDirection("EAST"); break; case Key.SPACE :// trace("SPACE");joe.startAction(); break; } }; Key.addListener(UserControl);