Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 11-08-2006, 01:46 PM   #1
antoinettemonthon
Registered User
 
Join Date: Nov 2006
Posts: 1
Default Dispatching custom event to multiple objects.

Hello to everyone on this my first post to this list.

I have been reading through many posts in here related to the EventDispatcher class and I have to admit that I am more confused now, may be for the different ways of using this class.

Let me explain what I am trying to achieve.

The idea is simple, maybe the solution as well, I would like to broadcast a custom event and having a few objects to catch that event and response in different ways.

I have been following Patrick Mineault tutorial on Using EventDispatcher, on it an instance of a class is able to fire an event that the same instance will catch an deal with it.

But what I want to achieve is a bit different, I want that instance of the class to fire an event and having instances of different classes responding to that event.

So this is my question, how can I make different objects to register for the same custom event.

So far, if I implement Patrick's solution, I cannot have a second instance of the Timer class listening to the 'timeout' event dispatched for the first instance.

My idea was that a broadcasted event will be listened for everyone and only those registered to deal with it will catch it and deal with it.

Thank you for any help you can give.
antoinettemonthon is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Objects with multiple name references omeg ActionScript 2.0 4 04-30-2006 07:12 PM
Listener objects vs event handler functions ... Reflex ActionScript 1.0 (and below) 2 01-15-2006 12:34 AM
combining multiple XML objects sralok ActionScript 1.0 (and below) 4 10-27-2005 07:10 AM
Multiple selection of text or objects at runtime amanind ActionScript 1.0 (and below) 0 07-29-2005 05:38 AM
instantiate objects in custom classes wasserfloh ActionScript 2.0 0 09-10-2004 10:42 AM


All times are GMT. The time now is 01:22 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.