3 Replies Latest reply on Nov 19, 2010 2:40 AM by BhaskerChari

    How to create a image button?

    YuHsin4221123 Level 1

      As on above. I can't find any component to create one of it.

        • 1. Re: How to create a image button?
          ravi burila

          you need to create an link

          button and then embed inage to act as image button


          it looks




          icon="@Embed('../images/Logout.gif')" id="logout" >






          here an image logout.gif will be embeded

          • 2. Re: How to create a image button?
            Abhinav Sharma Level 2



            You can use any of the below methods to make Image Button:


            using Image Control: Remember to use buttonMode="true"

            <mx:Image source="@Embed('images/YourImage.png')" buttonMode="true"  click="handleClick();" />


            or using Button Control:


            <mx:Button id="MyBtn2" click="handleClick();" icon="@Embed(source='images/searchbtn_icon.png')" />




            • 3. Re: How to create a image button?
              BhaskerChari Level 4

              Hi Yushin,


              You can apply css class to a button where in which you have embedded the various skin images..as shown..


              upSkin: Embed(source="../images/upSkinBtn.png");
              overSkin: Embed(source="../images/overSkinBtn.png");
              downSkin: Embed(source="../images/downSkinBtn.png");
              disabledSkin: Embed(source="../images/disabledSkinBtn.png");


              <mx:Button styleName="myButton" />