Hey everyone,

I have to figure out a way to have a Flex 2 component work in both Flex 2
and in Flash CS3. Basically the component is a custom made "Google maps"
type component entirely written in AS3 (no MXML at all). The component
itself is pretty light, but it can have layers and tiles as children (no
Flex UI components though). Thankfully, everything that can be attached as
children to the component inherits Sprite, not mx.core.UIComponent. It's
currently working swell as a Flex component, and now I have to figure out
how to make it work in both Flex and Flash as painlessly as possible.

The component extends mx.core.UIComponent and implements createChildren,
updateDisplayList, saveState and loadState (implements
IHistoryManagerClient). I was thinking maybe rewriting the component so it
inherits Sprite instead and then create one dummy component for Flex and one
for Flash, add an instance of the component in the dummy component, and
forwarding the events between the real and dummy components (basically using
composition). As I understand it, I have to inherit fl.core.UIComponent in
Flash and NOT mx.core.UIComponent, so I don't see a way around composition.
Also, I was wondering whether Flash would choke on the [Bindable] metatags
sprinkled through the layers classes.

If anybody has done this kind of work and has any hints on going forward, it
would be highly appreciated.

Patrick Mineault
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to