Quick Tip: Flash CS Button to Flex

If are trying to embed button symbols (extended SimpleButton) from Flash CS and the results are not what expected:

[Embed(source="assets/elements.swf", symbol="my_button")]
public static const BUTTON_CLASS:Class;
...
addChild(new BUTTON_CLASS())

try exporting your elements into .swc and attach into Flex project, later in code do:

public static const BUTTON_CLASS:Class = my_button;
...
addChild(new BUTTON_CLASS())

This may also help you capturing Event-s dispatched on custom frame from loaded MovieClips.

Leave a comment

Please be polite and on topic. Your e-mail will never be published.