|
Hmm, so everything else I've sent recently has been posted,
so I'll try to resend this. I know that flexcoders can have a slow posting
time for some people (which now seems to include me), but it's been a day.
If that's now normal, someone just let me know. Thanks,
Brian
From: Brian Deitte Sent: Friday, November 03, 2006 4:25 PM To: '[email protected]' Subject: RE: [flexcoders] specifying measuredWidth/measuredHeight in a skin Hi Mike, thanks for the response. I do have a
solution now, based on Dirk's example (http://www.richinternet.de/blog/index.cfm?mode=entry&entry=ADD4FDD1-9B48-BFBC-2A70F3C57EBC6892),
but I would be interested in knowing what I was doing wrong. I was doing
something I saw in the framework for Application, and subclassing
ProgrammaticSkin and using it in CSS as a background-image. The skin would
have to have the measuredWidth/measuredHeight, as previously mentioned, and
here's the a simplified version of the updateDisplayList()
method:
override protected function
updateDisplayList(w:Number, h:Number):void
{
super.updateDisplayList(w, h); // FIXME: override Application to add
styles for all values below, then getStyle() for each
// one and set in CSS var g:Graphics = graphics;
g.clear(); // set width and height to dimensions we want for this
gradient
w = 916;
h = 16; var fillColors:Array = [0xF7F7F7, 0xD5D5D5]; var fillAlphas:Array = [1, 1]; drawRoundRect(x, y, w, h, null, fillColors, fillAlphas, verticalGradientMatrix(x, y, w, h));
}
And
this works fine, but again only if the measuredWidth/measuredHeight is
set. So after seeing Dirk's code, I tried changing one skin over to
extend HaloBorder, not set the measuredWidth/measuredHeight, and then use the
skin in CSS as a border-skin. This works, I'm happy to say. It does
feel a little strange to me, that I'm using something called "border-skin" but
I'm doing things in the middle of a canvas. Is this part normal or should
I be using a background-image?
This
turned into a longer message than I thought! I'm starting to get into this
whole building-a-Flex-app thing. :) -Brian
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Schmalle Sent: Thursday, November 02, 2006 5:07 PM To: [email protected] Subject: Re: [flexcoders] specifying measuredWidth/measuredHeight in a skin Hi Brian, On 11/2/06, Brian
Deitte <[EMAIL PROTECTED]
-- 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
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___ |
- RE: [flexcoders] specifying measuredWidth/measuredHeight in a... Brian Deitte

