Fred DUFAU
unread,Dec 8, 2010, 11:37:10 AM12/8/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to VEGAS - ECMASCript & ActionScript OpenSource framework
Hello,
Je n'arrive pas à tourner le gradient d'un labelButton :
J'ai un peu essayé toutes les méthodes :
- en passant une matrix dans le fillGradient
- en jouant sur le gradientRotation du style
- en passant la matrix à gradientMatrix
mais rien n'y fait.
Voici mon code :
<code>
var mat:Matrix = new Matrix();
mat.rotate( 90 * Trigo.DEG2RAD );
var init:Object =
{
theme : new FillGradientStyle( "linear" ,
[0xeeeeee, 0x999999] , [1, 1], [0, 255] , null, "pad" , "rgb" , 0 ) ,
themeRollOver : new FillGradientStyle( "linear" ,
[0x999999, 0xeeeeee] , [1, 1], [0, 255] , null, S"pad" , "rgb" ,
0 ) ,
themeSelected : new FillStyle( 0 ),
useGradientBox : true
} ;
var tabButtonStyle:LabelButtonStyle = new LabelButtonStyle(init);
tabButtonStyle.topLeftRadius = 5;
tabButtonStyle.topRightRadius = 5;
tabButtonStyle.color = 0x000000;
tabButtonStyle.textRollOverColor = 0x000000;
tabButtonStyle.textSelectedColor = 0xFFFFFF;
tabButtonStyle.gradientRotation = 90 * Trigo.DEG2RAD;
var tabButton:LabelButton = new LabelButton(100, 24);
tabButton.index = pIndex;
tabButton.label = pTitle;
tabButton.style = tabButtonStyle;
tabButton.addEventListener( MouseEvent.CLICK, clickHandler );
tabButton.toggle = true;
tabButton.group = true;
tabButton.groupName = _buttonsGroupName;
_buttonsContainer.addChildAt(tabButton, pIndex );
</code>
Merci