Re: [Flashcoders] Entering hex number (a color) as component parameter

2007-03-22 Thread Muzak
, 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

Re: [Flashcoders] Entering hex number (a color) as component parameter

2007-03-22 Thread Alexander Farber
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

Re: [Flashcoders] Entering hex number (a color) as component parameter

2007-03-22 Thread Muzak
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

Re: [Flashcoders] Entering hex number (a color) as component parameter

2007-03-22 Thread Johannes Nel
] 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

Re: [Flashcoders] Entering hex number (a color) as component parameter

2007-03-21 Thread Alexander Farber
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; }

Re: [Flashcoders] Entering hex number (a color) as component parameter

2007-03-21 Thread Johannes Nel
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)]

Re: [Flashcoders] Entering hex number (a color) as component parameter

2007-03-20 Thread Johannes Nel
[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:

Re: [Flashcoders] Entering hex number (a color) as component parameter

2007-03-20 Thread Muzak
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

Re: [Flashcoders] Entering hex number (a color) as component parameter

2007-03-20 Thread Muzak
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

Re: [Flashcoders] Entering hex number (a color) as component parameter

2007-03-20 Thread Johannes Nel
: 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