Hi there,
I am having a hard time wrapping my head around what to do for the following situation:
I have multiple items in my app that I would like the user to click on. Some items are completely different classes.
The classes dispatch events and then when the events are captured, some modifications are done to the transform properties of a loosely coupled display object.
I want two separate classes to dispatch the same type of event, since I already have an image class that draws images based on a given url... I want the classes to dispatch the events, but then I think I want the difference to be detected when the event comes along... i.e., I would like to recognize the 'origin' or 'sub-type' of the event. Some sort of if/then logic would suffice.
Would it be better to have two separate types of events?
How do people normally do this?
Would anyone suggest creating some sort of variable to detect the 'sub-event-type' for the listener of the event?
Thanks for any thoughts...