Hi Gerald,
Try something like this:
private var count:Number = 0;
private function clickBtn():void{
++count;
if(count == 1){
btn.setStyle("fillColors",['black','black']);
}
else if(count == 2){
btn.setStyle("fillColors",['red','red']);
}
else if(count == 3){
btn.setStyle("fillColors",['green','green']);
}
else{
count = 0;
btn.setStyle("fillColors",['black','black']);
}
}
Call clickBtn function on the button click event.
HTH,
-Ravi
On May 12, 2:40 pm, Gerald Anto <[email protected]> wrote:
> can anyone say how to get dynamic colors in Action script.
> initially my button text has one color then every click of button the
> color should be changed.
> for example intially my color is 0x00FF00 then it has to change
> blue,red,green(any colors) etc.
>
> Thanks&Regards,
> Gerald A
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---