Archive for the 'Ch06: OOP' Category

30
May

Linkage Classes as Arguments


I like to make my custom UI elements easy to skin. If we wanted to create a check box class that was easy to skin, one thing we could do is create an FLA based AS3 component. Unfortunately to do that takes advanced programming skills. If you’re an intermediate programmer you might want to be able to create a skinnable UI element without all of the AS3 component architecture.

One way to achieve this is by creating a custom class that uses Library elements as assets. To increase flexibility (for swapping skins, for example), you can create each graphical element of your check box, store them in your Library, assign a linkage class name to each element, and then pass those linkage class names into your custom class.

Continue reading ‘Linkage Classes as Arguments’