please quote next time- so we know what context you are speaking of
here it is used in actionscript:
PHP Code:var pause:Boolean = true;//default state is pause equals true
_root.onEnterFrame = function(){//onEnterFrame loop,-
if (!pause){//put after this curly brace your game loop code
trace("engine runs....");
}
}
button_pauseSwitch.onPress = function(){//here is a button that unpauses or pauses the game
pause=!pause;//switch pause state
}
