,
Muzak
- Original Message -
From: Alexander Farber [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Wednesday, March 21, 2007 6:04 PM
Subject: Re: [Flashcoders] Entering hex number (a color) as component parameter
Thank you and sorry - I've missed the Color type in Flash help
Looks wrong to me because the drawing code (the setBgColor())
is called outside of the draw() method. Flash Help says to call
invalidate() from the set methods instead...
On 3/21/07, Johannes Nel [EMAIL PROTECTED] wrote:
he checks if the component is init'd
On 3/21/07, Alexander Farber [EMAIL
That is if you're extending UIComponent, which 99.9% of the time I don't ;)
regards,
Muzak
- Original Message -
From: Alexander Farber [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Thursday, March 22, 2007 9:04 AM
Subject: Re: [Flashcoders] Entering hex number (a color
] wrote:
That is if you're extending UIComponent, which 99.9% of the time I don't
;)
regards,
Muzak
- Original Message -
From: Alexander Farber [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Thursday, March 22, 2007 9:04 AM
Subject: Re: [Flashcoders] Entering hex number (a color
Thank you and sorry - I've missed the Color type in Flash help.
But what is the role of __hasInitialized in your example? Why can't I just:
[Inspectable(defaultValue=#66,type=Color)]
public function get bgcolor():Number {
return __bgcolor;
}
he checks if the component is init'd
On 3/21/07, Alexander Farber [EMAIL PROTECTED] wrote:
Thank you and sorry - I've missed the Color type in Flash help.
But what is the role of __hasInitialized in your example? Why can't I
just:
[Inspectable(defaultValue=#66,type=Color)]
[Style(name=myName, type=uint, format=Color)]
On 3/20/07, Alexander Farber [EMAIL PROTECTED] wrote:
Hello flash coders,
I have a mostly working component (please see Bubble.*
in http://preferans.de/flash/ ), but wonder how to make
the background color to be a parameter. Currently I have:
Try this:
[Inspectable(defaultValue=#66,type=Color)]
public var bgcolor:Number = 0x66;
You might be better off using a getter/setter since you will have to redraw the
rect_mc each time the color changes.
private var rect_mc:MovieClip;
private var __bgColor:Number = 0x66;
private
That's AS3 ;-)
- Original Message -
From: Johannes Nel [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Tuesday, March 20, 2007 12:55 PM
Subject: Re: [Flashcoders] Entering hex number (a color) as component parameter
[Style(name=myName, type=uint, format=Color
: Johannes Nel [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Tuesday, March 20, 2007 12:55 PM
Subject: Re: [Flashcoders] Entering hex number (a color) as component
parameter
[Style(name=myName, type=uint, format=Color)]
___
Flashcoders
10 matches
Mail list logo