|
You can create a variable
at application level and store values in there. You can write some code to
back up styles and retrieve later. I am giving following example for just idea,
it is not production quality code....It can be more generic and
better...
<mx:Application
xmlns:mx="http://www.macromedia.com/2003/mxml">
<mx:Script> var stylesBackup = new Object(); function backupStyle(obj, styleProp):Void { if(!stylesBackup[obj]) { stylesBackup[obj] = {}; }
stylesBackup[obj][styleProp] =
obj.getStyle(styleProp)
} function retrieveStyle(obj, styleProp):Void { obj.setStyle(styleProp,stylesBackup[obj][styleProp]); } </mx:Script> <mx:TextInput id="_ta" text="some text" color="0xFF0000" creationComplete="backupStyle(event.target, 'color');"/> <mx:Button label="Change Color" click="_ta.setStyle('color', 0x00FF00);"/> <mx:Button label="Retrieve Color" click="retrieveStyle(_ta, 'color');"/> </mx:Application> hope it
helps..
-abdul
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, June 07, 2005 9:06 AM To: [email protected] Subject: [flexcoders] How do you store and then retrieve the backcolor of something Yahoo! Groups Links
|
- RE: [flexcoders] How do you store and then retrieve the ... Abdul Qabiz
- [flexcoders] More interesting than Zorn? Jeff Steiner
- [flexcoders] Need help with protecting FLVs Jeff Steiner
- RE: [flexcoders] Need help with protecting ... Alistair McLeod
- Re: [flexcoders] Need help with protecting ... Seth Voltz
- Re: [flexcoders] Need help with protecting ... Manish Jethani
- Re: [flexcoders] More interesting than Zorn? - ... Jeff Steiner
- [flexcoders] Re: More interesting than Zorn... temporal_illusion
- Re: [flexcoders] More interesting than Zorn... Aldo Bucchi
- Re: [flexcoders] More interesting than ... Aldo Bucchi
- Re: [flexcoders] How do you store and then retrieve... nostra72

