And I realize this is an old one. The setActualSize(w, h) needs to be updateDisplayList(w, h);
Sorry about that. :)
Peace, Mike
On 6/21/06, Michael Schmalle <[EMAIL PROTECTED]> wrote:
Hey man,
this is a primitive example:
myContainer.setStyle("borderSkin", TaskListTitleBarBorderSkin );
or you know in CSS ;-)
code
-------------------------------------------------------
package com.teotiGraphix.skins.teo
{
import flash.geom.Matrix;
import flash.display.GradientType;
import mx.skins.RectangularBorder;
/**
*
*/
public class TaskListTitleBarBorderSkin extends RectangularBorder
{
var backgroundColor:Number;
/**
* Constructor
*/
public function TaskListTitleBarBorderSkin()
{
super();
}
/**
*
*/
public override function setActualSize(w:Number, h:Number):void
{
super.setActualSize(w, h);
graphics.clear();
var radius = getStyle("cornerRadius");
var fillColors:Array = getStyle("fillColors");
var fillType:String = GradientType.LINEAR;
//var colors:Array = [0xFFFFFF, 0xC7D3F7];
var alphas:Array = [100, 100];
var ratios:Array = [0x33, 0xFF];
var matr:Matrix = new Matrix();
matr.createGradientBox(w, h - 5, 0/*(Math.PI/2)*/, 0, 0);
var spreadMethod:String = SpreadMethod.PAD;
graphics.beginGradientFill(fillType, fillColors, alphas, ratios, matr, spreadMethod);
graphics.drawRoundRectComplex(0, 0, w, h, radius, radius, 0, 0);
graphics.endFill();
}
}
}
Peace, MikeOn 6/20/06, Tim Hoff < [EMAIL PROTECTED]> wrote:In the process of styling, I wasn't able to apply gradient fillColors
to containers (Panel, VBox...). Maybe, didn't make the final cut. In
some situations this would come in handy. Vector graphics consume
less resources. Has anyone subclassed this, to draw graphics as a
container's background?
Kindly,
Tim Hoff
--
What goes up, does come down.
--
What goes up, does come down. __._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
![]()
SPONSORED LINKS
Web site design development Computer software development Software design and development Macromedia flex Software development best practice
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___
Reply via email to

