ceb Posted May 21, 2014 Share Posted May 21, 2014 Hi as the title suggests, I was just wondering whether this is possible and how to do it? Please help thanks. Link to comment Share on other sites More sharing options...
lewster32 Posted May 21, 2014 Share Posted May 21, 2014 The loadUpdate state fires continuously as the preload state does its job, and the progress can be checked during this state via the game.load.progress property. You could use this to alter game.stage.backgroundColor over time. Link to comment Share on other sites More sharing options...
XekeDeath Posted May 21, 2014 Share Posted May 21, 2014 I had this nice reply all typed up, then hit the wrong reply button and lost it all when the page changed... But, I was basically saying the same thing lewster did... lewster32 1 Link to comment Share on other sites More sharing options...
ceb Posted May 21, 2014 Author Share Posted May 21, 2014 Thanks guys will give this a try. Link to comment Share on other sites More sharing options...
lewster32 Posted May 21, 2014 Share Posted May 21, 2014 There are some nice features in the Phaser.Color object to allow you to smoothly blend between two colours, for instance you could do something like this:function loadUpdate() { var intermedateColor = Phaser.Color.interpolateColor(0xff0000, 0x0000ff, 100, game.load.progress); // get a color between 0xff0000 (red) and 0x0000ff (blue) depending on load progress game.stage.backgroundColor = intermediateColor;} KevinnFtw 1 Link to comment Share on other sites More sharing options...
ceb Posted May 22, 2014 Author Share Posted May 22, 2014 Thats great thanks for the help Link to comment Share on other sites More sharing options...
Recommended Posts