OnSuspend on Flash and html5
Monkey Forums/Monkey Programming/OnSuspend on Flash and html5
| ||
hi.. while OnSuspend [monkeycode] //monkeygame.as internal function InvokeOnRender():void{ if( dead || suspended ) return; try{ graphics.BeginRender(); if( loading ){ OnLoading(); }else{ OnRender(); } graphics.EndRender(); }catch( err:Object ){ Die( err ); } } [/monkeycode] in flash build onSuspend( lost focus ), when we put this action, we need to call a pause GUI. in monkey now, when onSuspend(lost focus) has been called, monkey stop drawing and we can't called the pause GUI, but when it focused, pause GUI showing. Image 1, Pause with no pause GUI ![]() Image 2, Pause with pause GUI ![]() |