4 Replies Latest reply on Jan 21, 2009 9:15 AM by rtalton

    Clickable area limited

    Opptog
      Hiya

      I'm on my first Flex project and I've hit against a problem that got me stumped.

      I'm loading in image filenames from XML then cycling through displaying them as a slideshow. This is working fine :)

      I also need to make thse images clickable.

      The way I'm doing this is I have one Image (see code below) that I'm changing the source on. I've given up trying to modify the "click" attribute, so I'm also setting a variable that is called from a function on the "click".

      The problem is that the image (and flash area on the page) is 1000pix wide by 220 high, but the clickable area is only on the first 225ish pixels wide but full height.

      I've tried overlaying the image with a button - this causes the same effect - the button fils the area (and can be seen) but the "click" only works on the left hand side.

      Most oddly it only seems to be happening when the page is accessed through http using the same html (just a simple bit that shows the flash).

      Any ideas?
        • 1. Re: Clickable area limited
          rtalton Level 4
          Your sample code does not contain the height/width dimensions, however, am I to understand the image component is set to 1000W by 220H pixels? If so, that is the clickable area of the image component. If it isn't working that way, something else is changing the default behavior of the image component. Maybe this is a custom component or you have something else overlaying the image? Hard to guess without seeing the code.
          • 2. Re: Clickable area limited
            Opptog Level 1
            Gah thank you - you helped a lot by cofirming that it was probably just me doing something stupid!
            I was copying an object below the image that was showing, filling it with info from the xml (and so pre-loading the images) and when I "stored" this I was, of course, placing it on the area in front of my image. An old test cause this placing to be offset.

            So - yes I was hiding it behind another item.

            Thanks again - you put me on the right road :)
            • 3. Re: Clickable area limited
              Opptog Level 1
              Gah thank you - you helped a lot by cofirming that it was probably just me doing something stupid!
              I was copying an object below the image that was showing, filling it with info from the xml (and so pre-loading the images) and when I "stored" this I was, of course, placing it on the area in front of my image. An old test cause this placing to be offset.

              So - yes I was hiding it behind another item.

              Thanks again - you put me on the right road :)
              • 4. Re: Clickable area limited
                rtalton Level 4
                Haha! Way cool. I knew you'd find it.