Problem with getting and setting colorPicker selectedColor
Hi all, im having problem with a color picker. I set the selected color with AS, see it changed on screen but then later when I try to get the selected color value it always returns 0.
Im using Flash CS5.
To recreate the issue make a fla with a color picker on stage with the instance name line_color. Paste in the code below.
import fl.events.ColorPickerEvent;
line_color.selectedColor = 0xff0000;
trace(line_color.selectedColor); // displays 0
trace(line_color.hexValue); // displays 000000
line_color.addEventListener(ColorPickerEvent.CHANGE, changedColor );
function changedColor(e:Event)
{
trace(line_color.selectedColor); // correctly displays the selected color value
}
Am i missing something very obvious or is this flash weirdness?
Thanks
