PDA

View Full Version : playing animation without loading image files



shinriyo
9 Mar 2012, 1:28 AM
Hi there.

I created animation by Sencha Animator.
But, when the iPhone didn't have a cache, the animation plays without loading image files.
Would you tell me the way to play animation after loading all image files?

arnebech
13 Mar 2012, 9:12 AM
The animation starts to play when the "load" DOM event is fired. This typically means that all the images are loaded. You could also try to wrap the "AN.Controller.setConfig(configData);" in a setTimeout, to give the browser a little time to perhaps display the images after they are loaded.

e.g.


window.addEventListener('load', function(){
var configData = {...};
setTimeout(function(){
AN.Controller.setConfig(configData);
}, 10);
}, false);