Ants eating a lizard
Not much left of the lizard here, but that is how it should go in the nature.

Flex 2 - Embedding symbols

Abode Flex 2 Livedocs states: “Flash defines three types of symbols: Button, MovieClip, and Graphic. You can embed Button and MovieClip symbols in a Flex application, but you cannot embed a Graphic symbol because it cannot be exported for ActionScript.”

Now based on this I embedded few symbols from a SWF file and used them by creating MovieClips, but just few of them worked as expected.

[Embed(source='symbols.swf', symbol='froggy')]

public var froggy:Class;

var frog:MovieClip = new froggy() as MovieClip;

var monkey:Sprite = new froggy() as Sprite;

Later I noticed that if the symbol has only one frame on its timeline, it should be initialised as Sprite. Only those symbols which have more than one frame worked when initialising them as MovieClip.

In the upper code the “monkey” works if symbol has only one frame.

Shall this be a reminder for me and fellow Flash developers when similar situations occur.