Hi,
Try something along the lines of
PHP Code:var isPaused:Boolean = false;
function doPause(arg:Boolean):Void
{
if (arg)
{
trace("Paused");
}
else
{
trace("unPaused");
}
}
var pListener:Object = new Object();
pListener.onKeyDown = function():Void
{
if (Key.getCode() == 80)
{
isPaused = !isPaused;
doPause(isPaused);
}
};
Key.addListener(pListener);





Reply With Quote
