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

    How to create a image button?

    YuHsin4221123

      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

          <mx:LinkButton

           

           

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

           

          <mx:click></mx:click>

           

          </mx:LinkButton>

           

          here an image logout.gif will be embeded

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

            Hi,

             

            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')" />

             

            -

            Abhinav

            • 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..

               

              .myButton
              {
              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" />

               

              Thanks,

              Bhasker