I have a color picker which I set using
Menu.ColorPicker.selectedColor = 0x339900;
It displays the correct color when ran. If I try
it traces 0. Why is this? Even stranger is later I set some xml parameters using
xml.parameter = Menu.ColorPicker.selectedColor;
xml.parameter.@name = "color1";
xml.parameter = Menu.ColorPicker2.selectedColor;
xml.parameter.@name = "color2";
and sometimes it works and sometimes it doesn't. What is going on here?
Nevermind. I discovered that even though I'm using an on Event.COMPLETE the colorpicker doesn't seem to be finished loading. I added a 100ms timer and now it's returning the correct values.