Table of contents
- Very First Flex Preloader Customization
- Very First Flex Preloader Customization For Flex Builder 3/Flex SDK 3.2
In a previous article I explained how to create a custom preloader that will replace the very first flex preloader (the one that appears when starting application). That article was created using Flex Builder 2 and now needs an update because Flex Builder is at version 3 since a good time and Gumbo is on its way.
If you would try to implement that example in Flex Builder 3 you would notice a runtime error that sounds like this:
TypeError: Error #1034: Type Coercion failed: cannot convert dwd::CustomPreloader_WelcomeScreenGraphic@2a86781 to flash.display.MovieClip.
at dwd::CustomPreloader()[CustomPreloader.as:22]
Not so good…
To make it work you need to use DisplayObject instead of MovieClip. So change those lines like bellow:
from
public var wcs:MovieClip;
to
public var wcs:DisplayObject;
and from
wcs = new WelcomeScreenGraphic();
to
wcs = DisplayObject(new WelcomeScreenGraphic());
This should do it. If you found another way please tell us.
Tags: custom, Flash, Flex Builder 3, Preloader
This post was written by Andrei Ionescu
Views: 15734










Cool solution but what’s happened to wcs.gotoAndStop(0); ??
You can put that stop inside the FLA file and not use wcs.gotoAndStop(0) it in the Flex code.