I’m working on a little project in Flex that’s an application to upload images to a server. Since it’s a pretty lightweight application (~40 kb in release version), I would like it to display instantly when the html page is loaded. But somehow there’s a delay of up to 1-2 seconds before it shows up. I think it is a delay actually between the load and the display of the application, and I believe it could be removed.
However, I couldn’t find a solution on how to shorten/remove the delay. First, I tried to disable the preloader, but this did nothing. There’s actually a delay between a preloader shuts and the application displays (it is around 500 ms – 1 sec). My next guess was to write a custom preloader class to display at least an image of the application (even though it wouldn’t be clickable, but at least something).
Any advice would be greatly appreciated.
Well i actually managed to get the desired behavior. Your comments were useful though.
Here’s how. I implemented a custom preloader for my application, and in the constructor of the preloader I loaded an image (read: screenshot) of my application in a disabled state (so that user won’t want to interact with it). I used the SnapShot Demo from this link – http://blogs.adobe.com/aharui/2010/01/custom_preloader_downloadprogr.html
Here’s the code that I wrote for the preloader (most of is is from the link below, a cut version):
package
{
}
I got a huge class eventually, but it does what its supposed to. Any comments on the code would be appreciated.