Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: viewComponent Question  (Read 7715 times)
davidTikva
Jr. Member
**
Posts: 12


View Profile Email
« on: August 09, 2010, 01:32:23 »

Hello,
I'm using PureMVC with AS3 platform.

so, I got a viewComponent. for example a Sprite or a MovieClip
the component should communicate with the mediator through events.
my question is how to do it?
should all the components extends EventDispatcher?

thanks in advanced
David
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: August 10, 2010, 07:06:34 »

MovieClip and Sprite both already extend EventDispatcher, so you're set. Just dispatch events and listen for them in your Mediator. Set your event listeners in the Mediator's onRegister method.

-=Cliff>
Logged
Pages: [1]
Print