Posted By

GarthDB on 04/22/09


Tagged

default Flex skin component 4 spark Gumbo


Versions (?)

Setting a Default Skin


 / Published in: ActionScript 3
 

This is an example of how to define a default skin in a component written in ActionScript 3 that extends a spark component.

  1. package components {
  2.  
  3. import skins.MyComponent;
  4. import spark.components.supportClasses.Component;
  5.  
  6. public class MyComponent extends Component {
  7.  
  8. public function MyComponent() {
  9. super();
  10. var t:* = getStyle('skinClass');
  11. if(t == undefined){
  12. setStyle("skinClass", skins.MyComponent);
  13. }
  14. }
  15. }
  16. }

Report this snippet  

You need to login to post a comment.