3 Replies Latest reply on Jun 17, 2011 5:32 AM by Claudiu Ursica

    Event not bubbling properly

    digitallegit

      I am following a presentation model pattern for a component I am creating.

       

      I have a view which houses all my mxml then an actionscript class that houses the logic.  I then have another view that contains this custom component.  The actionscript class is dispatching an event with the bubbles argument true.  I want to catch the event in the containing main view but it is not able to see the event and there is nothing cancelling the event propogation.

       

      The object hierarchy looks like this:

       

      actionscript class (dispatches event)

                |

      custom component view

                |

      main view (should catch the event)

       

      I've attached an event listener to the custom compoenent and it is not catching the event.  If I make the actionscript class public and add the event listener to that class specifically it does get called.

       

      My problem is that I don't want the actionscript class to be public, can anyone explain why making the event bubble still doesn't allow the main view to listen to it?