Sure. I actually went to this route for more complex projects. It gets crazy trying to manage events, director events, send sprites, etc. By using a custom event manager you can set it up so that when an action happens it just tells the global event object what action it did and any parameters. I have mine set to receive...

The event name (symbol)
The event data (typically a property list of info)
A qualifier - To restrict which events run.

So you can register things with the manager like buttonClick. When a button is clicked it just triggers the event and passes its name as a qualifier. The manager checks the objects for anything with that event that matches the qualifier and triggers the callback. This is also useful if you want multiple objects to respond to an event at once.

Carrying this over to 3d is also a much easier way to catch and trigger item interactions.

-Chuck
--------------------------
Chuck Neal
CEO, MediaMacros, Inc.
[EMAIL PROTECTED]
http://www.mediamacros.com
--------------------------
Check out the Developers Mall
Your one stop shop for all your Director Xtra Needs
http://www.mediamacros.net/customer


arjen wrote:
hi

i'm working on a project in which i need stuff to happen event driven.
i send requests to a server, and have to wait for a respons before sending a new event,
and ofcourse this new event can depend on the previous respons.

also, there's several objects sending requests and waiting for responses (independantly), so i need some sort of event-queue

so my question is, what is a sensible way to implement tha in lingo?

i know it's a very broad question, with probably a not so simple answer, still maybe can shed some light on this. i can give more details if wanted.

thanks
arri

[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [email protected] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[email protected]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to