then again, Jesse might know a thing or two about that :)
 
Dimitrios Gianninas
RIA Developer
Optimal Payments Inc.
 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of JesterXL
Sent: Wednesday, July 19, 2006 8:38 PM
To: [email protected]
Subject: Re: [flexcoders] gradient background color on VBox

Override updateDisplayList, and draw it.

http://pastebin.de/9345

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
xmlns:local="*">
<local:VBoxGradientBackground>
<mx:Button label="Sup, Imma Button" />
<mx:Button label="I'm here to showcase vert" />
<mx:Button label="YOu mean like skating?" />
<mx:Button label="Naw man... Flex' VBox" />
</local:VBoxGradientBackground>
</mx:Application>

<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300">

<mx:Script>
<![CDATA[

import flash.display.Graphics;

override protected function updateDisplayList(unscaledWidth:Number,
unscaledHeight:Number):void
{
super.updateDisplayList(unscaledWidth, unscaledHeight);

var fillType:String = GradientType.LINEAR;
var colors:Array = [0xFF0000, 0x0000FF];
var alphas:Array = [100, 100];
var ratios:Array = [0, 255];
var matrix:Matrix = new Matrix();
matrix.createGradientBox(unscaledWidth, unscaledHeight, 45);
var spreadMethod:String = SpreadMethod.PAD;

graphics.clear();
graphics.beginGradientFill(fillType, colors, alphas, ratios, matrix,
spreadMethod);
graphics.drawRect(2, 2, unscaledWidth - 2, unscaledHeight - 2);
graphics.endFill();
}

]]>
</mx:Script>

</mx:VBox>

----- Original Message -----
From: "Engkee Kwang" <[EMAIL PROTECTED]com>
To: <[EMAIL PROTECTED]ups.com>
Sent: Wednesday, July 19, 2006 8:02 PM
Subject: [flexcoders] gradient background color on VBox

is there a way to set gradient background color on a VBox.

it does not allow me to specify an array of color on backgroundColor
property.

same question wrt. background alpha.

-Engkee

--
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

AVIS IMPORTANT

WARNING

Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement privilégiés destinés au seul usage du destinataire visé. L'expéditeur original ne renonce à aucun privilège ou à aucun autre droit si le présent message a été transmis involontairement ou s'il est retransmis sans son autorisation. Si vous n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses pièces jointes, de votre système. La lecture, la distribution, la copie ou tout autre usage du présent message ou de ses pièces jointes par des personnes autres que le destinataire visé ne sont pas autorisés et pourraient être illégaux. Si vous avez reçu ce courrier électronique par erreur, veuillez en aviser l'expéditeur.

This electronic message and its attachments may contain confidential, proprietary or legally privileged information, which is solely for the use of the intended recipient. No privilege or other rights are waived by any unintended transmission or unauthorized retransmission of this message. If you are not the intended recipient of this message, or if you have received it in error, you should immediately stop reading this message and delete it and all attachments from your system. The reading, distribution, copying or other use of this message or its attachments by unintended recipients is unauthorized and may be unlawful. If you have received this e-mail in error, please notify the sender.

__._,_.___

--
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




__,_._,___

Reply via email to