I've created a dynamic ResourceLoader class which loads all
required assets into an internal dictionary, storing the
Loader.content (which is a bitmap object) keyed by a string name.
Everything works fine and dandy when I clone() the bitmapdata and
cast it to a display object, but when i try to do the same thing
and set it to setStyle, I get this weird error:
Type Coercion failed: cannot convert
flash.display::Bitmap@c479439 to Class.
How can that be? Isn't everything derived from class?
So instead of this: (only relevant lines below)
private var defClick:Class;
/// in ctor....
I'm now trying to do this:
// after load...
mImages["defClick"] = mLoader.content;
// during button construction..
Does anyone have any suggestions on where I'm going wrong?