user2467223
user2467223

Reputation: 29

AS3 cant keep frame rate at zero

So I got this game I did. I want to set its frameRate to 0, yet whatever I do that its looks like zero, but I noticed that after about a minuet the game will go one frame foward, which meant the framerate is not really 0 but something like 0.0001.

I must make it complete zero, because when I publish to mobile the game keep running when its minimized. one frame per minuet is no what I told flash to do.

 public function pauseGame():void {
        isPaused = true;
        stage.frameRate = 0;
}

Upvotes: 2

Views: 547

Answers (2)

sanchez
sanchez

Reputation: 4530

You can't set it to zero.

Valid range for the frame rate is between 0.01 and 1000 frames per second.

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Stage.html#frameRate

Upvotes: 6

Pan
Pan

Reputation: 2101

If your game control animators like starling(only one entry to control all animators) and you have only one timer to control all time show, you can pause the game by pause the animator control and global timer.

Upvotes: 0

Related Questions