PDA

View Full Version : Preload image?



ZyBeR
28 Jul 2013, 11:09 AM
In Sencha Touch you can preload images through the load event, in ExtJS there are no load event what I can find.

How can I in ExtJS preload images?

Arg0n
29 Jul 2013, 4:29 AM
You could do it here:

http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.app.Application-method-launch

A (http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.app.Application-method-launch)nd after loading you can create your viewport =)

ZyBeR
29 Jul 2013, 5:59 AM
Creative, I'll give you that :)

But unfortunately I need to do it at runtime as my application is loading new images a few times per minute.

There must be away around is as it works in Sencha Touch 2.x.

Arg0n
29 Jul 2013, 6:26 AM
To preload images you would need to know which images are needed. Could you explain in detail what you are doing? ^^

ZyBeR
29 Jul 2013, 6:44 AM
Here is what I'm working on (without any preloading).
http://goo.gl/zovdgX

Arg0n
29 Jul 2013, 11:29 PM
You could save the images in a store if you want. Which will be loaded while the application is launching.

http://stackoverflow.com/questions/934012/get-image-data-in-javascript