1 Reply Latest reply on Jan 3, 2012 10:26 PM by Deepu

    Change ToggleButtonBar icon At runtime

    Deepu

      Hi i i am building a movie player

       

      i have ToggleButtonBar with a play button ,how can i change the icon to pause  

       

      <mx:ToggleButtonBar  id="tBbar"   itemClick="tBbar_itemClickHandler(event)" width="200"  height="35">

                                              <s:ArrayList id="aL">

                                                        <fx:Object  name="play" icon="@Embed('/icons/play.png')"/>

                                              </s:ArrayList>

                                    </mx:ToggleButtonBar>

       

      <fx:Script>

                          <![CDATA[

       

      protected function tBbar_itemClickHandler(event:ItemClickEvent):void

      {

             if(event.item['name']==play)

            {

                 movie.play();

                 // i need to change or replace play icon with Pause icon

                    i have pause png in same location,i need help

            }

      }

       

       

      ]]>

                </fx:Script>