0 Replies Latest reply on Dec 2, 2008 1:54 PM by blipstation

    Custom Event not bubbling up to grandparent

      I have the following hierarchy of custom components written in AS:

      AltDialogue extends UIComponent
      ----- AltChoice extends HBox
      ----------- ToggleButton extends Button and which dispatches the following event:

      package components.events
      import flash.events.Event;

      public class ToggleEvent extends Event
      public static const TOGGLE_EVENT:String="toggleEvent";
      public var open:Boolean;

      public function ToggleEvent(open:Boolean, bubbles:Boolean=true, cancelable:Boolean=false)
      super(TOGGLE_EVENT, bubbles, cancelable);


      public override function clone():Event{
      return new ToggleEvent(open, bubbles,cancelable);

      I can get AltChoice (the parent) that has the ToggleButton instance called _dropdownBut to listen to the event via:


      private function toggleListener(e:ToggleEvent):void{

      But when I try to listen to the event from AltDialogue (the grandparent) that has the AltChoice instance _choice with this:


      private function toggleDropdown(e:ToggleEvent):void{
      trace("open dropdown");
      trace("remove dropdown");

      I get nothing traced out in debug mode and that's where I want to respond to the event. What am I missing?