[osflash] dispatchEvent scope in ARP
nyls
xxx at nyls.demon.nl
Fri Jul 21 09:39:41 EDT 2006
Hey Dan,
I always have the eventListener in my topmost view where I need it, so if an
event dispatches from minipanel and it should go to panel_1, I put the
eventListener in Application. And let it listen to the childView
I then use the childForm (and bubble extension) from Peter (see the Lab) so
events bubble up through my forms till it is catched by a view ...
Then in Application I reference the childView , like so
childView.doSomething() ..
But I think you could also use the SystemController from grant's ARPX
package. Views listen for events from the systemcontroller, and views send
events through the systemcontroller.. There is some stuff on the ARP
mailinglist about this..
Is this any help??
nyls
-----Oorspronkelijk bericht-----
Van: osflash-bounces at osflash.org [mailto:osflash-bounces at osflash.org] Namens
Dan Course
Verzonden: vrijdag 21 juli 2006 13:47
Aan: osflash at osflash.org
Onderwerp: [osflash] dispatchEvent scope in ARP
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
_______________________________________________
osflash mailing list
osflash at osflash.org
http://osflash.org/mailman/listinfo/osflash_osflash.org
More information about the osflash
mailing list