[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: class Bubble extends UIComponent { [Inspectable(defaultValue=0xFFFF66, type='Number')] private var bgcolor:Number = 0xFFFF66; .... private function draw():Void { super.draw(); .... // draw a yellow rectangle: w x h rect_mc.clear(); rect_mc.beginFill(bgcolor); rect_mc.moveTo(0, 0); rect_mc.lineTo(w, 0); rect_mc.lineTo(w, h); rect_mc.lineTo(0, h); rect_mc.lineTo(0, 0); rect_mc.endFill(); .... - but the component inspector (Alt-F7) won't allow me to enter hexadecimal values like 0xFFFFFF into the "bgcolor" field. Only decimal values will work (which is a bit awkward to use for colors). How could I circumvent this? Use string? Regards Alex -- http://preferans.de _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
-- j:pn http://www.lennel.org _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com