1 Reply Latest reply on Jan 29, 2008 4:12 AM by karthikkv81

    image effects

    albert_3d Level 1

      New to Flex and had a couple of questions regarding the use of images in MXML, specifically when used in a <mx:image> tag.
      How can I make the image clickable or linkable?
      Something simple like clicking on the image and having it open a link.
      Can this be done with the image tag? Or would I have to use the button control and set the icon as my image file?

      Also, how can I add a popup textbox when rolling over the image? Or does this only work with a button control also?



        • 1. Re: image effects
          use the click property of image to call ActionScript function and create a link or whatever u want to achieve in the function. for example...

          <mx:Image click="createLink()" source="../assets/mbpixel1.jpg" width="30%" height="28%" scaleContent="true" scaleX="80" scaleY="65" autoLoad="true" id="landscapeImage"/>

          ActionScript code is below...
          public function createLink():void {
          resultLabel.text = "image clicked!!!";