i have written classes in as3... my swf works fine locally but at live link, images do not load or shown first time but when you refresh the browser again they are loaded and shown.. i know they comes in cache but what is happening first time.. you can clear your browser cache and check the problem happens each time when it is not in cache... all images are less than 1 mb.. here is the link http://web.s4spk.com/irfan/loadtest1/project.html
views:
17answers:
1
A:
Without seeing your code, it's difficult to know what the problem is.
It is likely that you have a race condition where the code you use to display the images is executing before the images have finished loaded. Once the images are in cache, they obviously load a lot quicker.
If you are using a Loader to load the images in, make sure you are handling the Complete event of the loader and taking appropriate actions there to ready the images for display.
DanK
2010-05-29 13:33:59
thanks... i think that will work for me!
Muhammad Irfan
2010-05-29 18:08:57
thanks Dank... u showed me the right way, the code was in race condition, i have used gotoAndPlay(2) that runs before loading of all images but the second time , images are cached in browser and loads before this statement.. so code works..
Muhammad Irfan
2010-05-30 00:28:54