3 Replies Latest reply on May 15, 2009 3:00 PM by miragevideo

    Events and loaded SWF's


      Hello All,


      I have an app build with Flex 3 that loads various swf files.  Some of the swf files have buttons.  The main flex app has an event listener for mouse events.  The effect of clicking on the main app is to display a spite at the mouse location. This sprite then is removed after a short timeout period. What is happening is the sprite blocks the button underneath it and prevents the click event from being received.  I am looking for a technique to handle this entirely in the main flex app. Any ideas??


      What needs to happen is this:

      1. User clicks on main app
      2. Sprite appears and is removed automatically after about 1/2 second
      3. Simultaneously the click event is passed into the loaded swf so it can respond to it.


      What is happening now is this:

      1. user clicks main app
      2. sprite appears and is removed automatically
      3. loaded swf does not set this event unless the mouse up action (i.e physically lifting the mouse button) is delayed until after the sprite is removed.


      Since a mouse click is really a mouse up event, the sprite is receiving the mouse up and it is not passing it on.  I have a mouse up listener on the sprite, but what do I need to do?  Can I issue another mouse up event from this listener method? I can but then the sprite will receive it again and I'm in a loop.  Do I have to remove the mouse up listener, issue the mouse up event, then wait , then re-add the listener.  This seems a bit clunky!