PDA

View Full Version : resources preload


epopov
11-04-2003, 11:10 AM
Hi,
I want to load resources for my visual elements after application initialization. I use setSource() method for it. But I have a lot of resources and I don't want to send 50 requests (setSource(resource_url)).

Is there some other way? Can you give me an example?

antun
11-04-2003, 11:22 AM
Right now setSource() is the only way to load and set resources at run-time.

Is there a reason you have to set the image using setSource()? You can also do something like:


<view resource="http://www.laszlosystems.com/images/smiley.gif" />


... or just:


<view resource="http:smiley.gif" />


... which will load the image at run-time. By definition, loading an image at run-time will cause a request to be sent.

What kind of visual elements are you talking about exactly?

-Antun