Hi
I had a custom MXML component, that I have converted to a pure AS3 component that extends Canvas. I took the stylings i.e. alpha, color etc. from the MXML and added them to a .css file under /src/assets/.
My question is, how do I apply these styles within the custom AS3 component i.e. constructor or init()?
I read that you declare the style source only in your MainApp.mxml using <mx:Style source="assets/css/swimlaneStyle.css"/>
. If so, then how do I then apply it?
The .css example is below
/* CSS file */
Canvas.roundedCanvasYellow{
backgroundColor:#ffffcc;
cornerRadius:5;
dropShadowEnabled:true;
dropShadowColor:#2A2929;
borderStyle:solid;
borderThickness:0;
backgroundAlpha:0.9;
}