How to set skin at runtime in Flex 4

Posted by Ben on Stack Overflow See other posts from Stack Overflow or by Ben
Published on 2010-05-12T06:52:47Z Indexed on 2010/05/12 7:14 UTC
Read the original article Hit count: 253

Filed under:
|
|
|

Hi,

I have a bunch of custom controls based on a SkinnableContainer.

When adding the control at design time, I can specify a skin by using the skinClass attribute on the tag.

I need to add some of these elements during runtime, and I can't figure out how to specify the skinClass for my controls.

eg.

var something:CustomThing = new CustomThing();

/* mistery code here to attach the skin ? */

addElement(something);

How do I do this?

Thanks!

© Stack Overflow or respective owner

Related posts about flex4

Related posts about gumbo