Instead, we can fill up a DisplayObject that comes with following inheritance:
Image -> SWFLoader -> UIComponent -> FlexSprite -> Sprite -> DisplayObjectContainer -> InteractiveObject -> DisplayObject -> EventDispatcher -> Object
Than again, we don’t want to use the convenient Image component because it comes with the following inheritance:
2. Any imagery that we want to show up should naturally be in the single digit kilobytes to begin with. Photoshop offers a lot of ways to optimize the size of the image.
And another thing is that we want to avoid any custom fonts in the preloader because that will surely blow it up.
TextField -> InteractiveObject -> DisplayObject -> EventDispatcher -> Object
That is a good part of the Flex framework that we want to avoid for the preloader. Instead, because we just want to render the text, we can use the TextField object which comes with following inheritance:
Label -> UIComponent -> FlexSprite -> Sprite -> DisplayObjectContainer -> InteractiveObject DisplayObject -> EventDispatcher -> Object
1. So we want to show the percentage loaded, right? Well, the Label component just won’t work out. Label comes with following inheritance:
I would like to point out a couple things:
Problem in Flex more so than in Flash is keeping the preloader lightweight. So we have to achieve the visual appeal, animation, some basic text rendering without all the convenient native Flex components that would make the delay before seeing the preloader too long. So we have to keep it simple. Kudos to Andrew for publishing a great way to do this.
- Possibility of actually making the preloader entertaining enough to keep the users attention
- Some branding to show what are we waiting for that would involve some imagery, like a logo
- What is the status of loading – both numerically and graphically
Andrew’s example allows us to have a lightweight preloader base that we can extend and solve the following problems that I think every preloader should:
There are some great examples out there like and the one that I’m using as a base for this demonstration from .
Another important thing that the default preloader naturally doesn’t provide is some branding while the user is waiting for the loading to complete.
Here we have a demonstration to an age old problem in Flash (inherited in Flex) – the Preloader. I think that the Flex community has long ago grown bored with the default preloader, which I am very thankful to Adobe engineers for providing us in the first place. It’s just that we keep seeing it over and over and over…
Product Launch BlogHow to build the right software, get customers and keep them coming back
Custom Flex 3 Lightweight Preloader with source code | Pathfinder Software
Комментариев нет:
Отправить комментарий