Just to add another approach..

Use the event "currentStateChange" [1] and switch/case the string based state 
names [2].  The "icon" is a style [3] (setStyle).   This should all be allowed 
from an inherited class for the ToggleButton.
 


[1] 
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/core/UIComponent.html#event:currentStateChange
[2] 
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/ToggleButton.html#SkinStateSummary
[3] 
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/supportClasses/ButtonBase.html#style:icon


-Mark

-----Original Message-----
From: mark goldin [mailto:[email protected]] 
Sent: Thursday, July 25, 2013 11:01 AM
To: users
Subject: ToggleButton and state images

How can I provide different images for ToggleButton's states without
modifying its skin (if possible)?

Thanks

Reply via email to