Jump to content

Resizing browser / orientation change breaks tweens and animations (BUG)


Ninjadoodle
 Share

Recommended Posts

Hi guys & @rich

I've tried setting up tweens as well as frame by frame animations, and I've noticed that when resizing the browser window, or changing orientation on a device, sometimes the tweens/animations get stuck / don't finish.

This is an issue on all browsers I've tried, and both iOS and Android.

Is there a way to stop this from happening?

Thank you in advance for any help!

Link to comment
Share on other sites

  • 2 weeks later...

Have you tried using the scale manager?

function preload() {
	game.scale.scaleMode = Phaser.ScaleManager.NO_SCALE;
	game.scale.fullScreenScaleMode = Phaser.ScaleManager.NO_SCALE;
}

http://phaser.io/docs/2.4.4/Phaser.ScaleManager.html

You can also do checks based on orientation

[readonly] isGameLandscape : boolean

[readonly] isGamePortrait : boolean

http://phaser.io/docs/2.4.4/Phaser.ScaleManager.html#incorrectOrientation

 

Link to comment
Share on other sites

Hi @symof

 

Thank you for the tips, I do however need the browser window / game to be scalable (I'm using the scale manager to do that).

I'm also aiming to make the game responsive, and therefore playable in any orientation.

Right now, I'm really stuck with this as it looks very unprofessional/broken, when the animations just stop half way.

I'm pretty sure this is a bug, as it only happens when scaling / changing orientation - and must be something to do with the animations being paused and not resuming.

If anybody could help with this, I would really appreciate it :)

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...