Can someone explain why this code does not work then? I tried to make it so that it will change the button color to red then back to its original color but its not working?
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns="*"> <mx:Script>
<![CDATA[
public var oldColor:Object; ]]> public function changecolor(){ oldColor= buttonthree.getStyle("color"); buttonthree.setStyle("fillColors", [0xCCC333,0xCC0065]) }
public function changebackcolor(){ buttonthree.setStyle("color", [oldColor])
} </mx:Script> <mx:HBox id="buttonstocolor" visible="true"> <mx:Button label="press to restore color" click="changebackcolor()" id="Buttonone" /> <mx:Button label= "Press to change color" click="changecolor()" id="Buttontwo"/> <mx:Button width="30" id="buttonthree"/> </mx:HBox>
</mx:Application> Yahoo! Groups Links
|
- Re: [flexcoders] How do you store and then retrieve the bac... nostra72
- Re: [flexcoders] How do you store and then retrieve th... Manish Jethani
- Re: [flexcoders] How do you store and then retrieve th... nostra72
- RE: [flexcoders] How do you store and then retrieve th... Ashish Goyal
- Re: [flexcoders] How do you store and then retrieve th... nostra72
- Re: [flexcoders] How do you store and then retriev... Manish Jethani
- Re: [flexcoders] How do you store and then retrieve th... nostra72