2 Replies Latest reply on Oct 22, 2007 6:49 AM by McKipPeR

    Image blocking button in SWF

    McKipPeR
      Hi, hope someone can help.

      In my Flex application I have a map of the UK, built in FlashCS3, in which there are clickable 'regions' to click through to a close-up of that region.

      I also have numerous 'pins' on the map (added at runtime in Flex) above the SWF whch create dead spots on the regions where the button object is not registering that the mouse is over it.

      Is there any way to get Flex to tell an image to be completely ignored by the mouse??

      Many thanks,
      George.
        • 1. Re: Image blocking button in SWF
          MikeBurns76
          There are two ways to approach this:

          one is to handle all events with an invisible display object that sits at the very top of the display list, and therefore receives all events. But then you have to check the coordinates and handle things appropriately, which might be tricky, depending on your situation.

          The other is to add an event listener to the graphic and when it is captured, pass it along to the object underneath. I dont think MouseMove events bubble, but Click events do. So the objects underneath should receive Click events. But if you're simply interested in catching MouseMove or MouseOver, then capture it with the pin graphic and then dispatch an event to the button object.
          • 2. Re: Image blocking button in SWF
            McKipPeR Level 1
            Thanks Mike.

            I think I will go with the second option, as it will be simpler in this case. Had an inkling it wouldn't be as simple as .ignoredByMouse = true;

            :o)

            Regards,
            George.