[osflash] dispatchEvent scope in ARP

Dan Course dancourse at gmail.com
Fri Jul 21 07:46:50 EDT 2006


Hi osFlash peeps,

I'm trying to work out the scope of dispatchEvent, an where Movie
Clips (with linked classes) should add their addEventListeners? So
what is the scope of a Dispatch Event? for eg,

-- Application ( which holds Panel_1, Panel_2 and Button_X )

    -- Panel_1

    -- Panel_2 ( which holds MiniPanel_1 )

        -- MiniPanel_1

If Panel_2 Dispatch's the event, eg, "greenClick", how would Panel_1
hear it, and how would MiniPanel_1 hear it?

Should the Application add an 'addEventListener' for Panel_2,

application.addEventListener ( "greenClick", Delegate.create ( this,
greenClickedNow ) );

which then Dispatches an event to Panel_1, but how does Panel_1 hear
it? Should the Application call a function in Panel_1?

Thanks for your time, I hope it's not too complicated a question,

DanC
dancourse at gmail.com



More information about the osflash mailing list