blog
{Some Little News}
VR
{Virtual Reality}
media
{Photos + Videos}
code
{Websites + Apps}
5core
{Five Core}
Stupid Image Preloader [Flex]
I was trying to create a simple preloader for my image gallery in Flex; so i ended up with something like this:
[code lang="XML"]
<mx:Image progress="pre.visible=true" complete="pre.visible=false" source="img.png"
height="40" width="40" />
<mx:Image id="pre" source="@Embed(source='preloader.swf')" height="40" width="40" />
[/code]
we simply use the events progress and complete of the image loading to show or not our coustom preloader pre. Note that the preloader code is placed after the one of the image, thus it will appear above the image.
This is just the solution i adopted, if you are looking for something more professional please have look to this tutorial.






