1 Reply Latest reply on Jun 7, 2012 11:10 AM by rexdtripod

    Dynamically replace spark button icon on click

    rexdtripod Level 1

      I'm looking to toggle "play" and "pause" button icons for a button in a video player I've developed.  This is an IOS packaged app so use of "ToggleButton" is not recommended by Adobe. It's not mobile optimized.


      When clicking the button the current icon should be replaced with the other dynamically. 


      How do I do this generically - in essence, with out hard coding paths to the assets inside the skin?


      I see lots of examples where you can pass an icon to an instance of a skin - like this http://blog.flexwiz.net/tip-easy-spark-icon-button/.


      But how do you then toggle to another icon on the fly when the user clicks the button?