On 30 Jan 2006, at 16:30, Alan MacDougall wrote:
I've made a single item work with my initial solution, which was
to have a list for each item that lists which items in the other
lists should highlight. But by the time I've made 25 lists for my
25 (current) items, that seems like a lot of redundant and
duplicated data somehow.
That sounds to me like you want to use events -- the items which
light up should listen to the items that trigger them. When the
triggering item gets moused over, the listening item(s) can decide
whether to react. This might just take your redundancy and put it
somewhere else, but it keeps you from writing and checking a ton of
different lists.
Yeah, that sounds good. I haven't used events and listeners much, so
upfront it might take me longer than my first approach. But let me
see if I have the theory right.
Each item in the lists is assigned a listener object as it is
created, which would be a list of the possible events that will
trigger it. Each item also has an event object that fires when rolled
over.
Rolling over item A fires an event that all the other items hear,
each other item checks its list of events that will trigger it, and
if it finds the event that was fired, it does its thing.
Does that sound about right?
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders