Thanks to everybody on the list. It seems that it was a bit of misunderstanding. I was trying to create a Canvas component and to be able to fill the background with gradient but to specify more then 2 colors, like it is possible with let's say Button component.
So I tried using LinearGradient class from mx.graphics. Like this : <mis:MyCanvas width="200" height="100" borderStyle="solid" borderThickness="10" cornerRadius="10"> <mis:fill> <mx:LinearGradient> <mx:entries> <mx:GradientEntry color="green" ratio="0" alpha=".5"/> <mx:GradientEntry color="red" ratio=".33" alpha=".5"/> <mx:GradientEntry color="blue" ratio=".66" alpha=".5"/> </mx:entries> </mx:LinearGradient> </mis:fill> </mis:MyCanvas> So Ely, I was going for the mx.graphics classes :-) Dirk, thanks for the great example of doing this using skins, but this time I wanted to try this approach. I guess it depends on what needs you have, in my case I can easily change the Linear Gradient to Radial, in Dirks case it's easier to skin more then just the canvas. And finally, my code was just fine but stupid me I was doing beginFill, endFill and then draw the shape :-) Thanks again guys, Cristian Pop -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/