Hi all,
I'm putting together a site which will use a number of different preloaders and select which one to use based on the current branch. The selection process is a breeze thanks to Gaia's hijacking features.
My intention is to have a collection of interchangeable Preloader classes, all sharing common inheritance and interfaces.
From reading the documentation it appears that there are two ways of replacing the default preloader:
1. At compile time using
preloader="myCustomPreloader.swf"
in the site node or,
2. At run time using
setPreloader(asset:MovieClipAsset)
So a preloader added at compile time must:
Implement the IPreloader interface either directly or by extending AbstractPreloader.
...and a preloader added at runtime must:
Be a loaded MovieClipAsset
In theory, could I write custom preloader Classes that would satisfy both of these conditions whilst still inheriting from AbstractBase? If so, you could have one big package of homogenous preloader classes and not have to worry about whether the custom preloader was to be used at compile or run time.
If each
transition (EDIT: sorry, meant preloader not transition!) was a compiled swf with a document Class that extended AbstractPreloader, could the resulting loaded asset be cast to AbstractPreloader AND MovieClipAsset ?