Well, regardless of whether or not you use listeners, you still need
to create the data relationship. I don't think encoding the
relationships into 25 listeners is necessarily a good idea, either.
An associative array, indexed by ID, could store the IDs of the other
list items that are related, all in a single data structure. So for
instance:
listRelationships["itemID1"] = ["itemID2", "itemID3"];
listRelationships["itemID2"] = ["itemID1"];
listRelationships["itemID3"] = ["itemID2"];
This allows you to store arbitrary relationships between each list
item. When a list item is moused over, just grab listRelationships
[itemID] and you will get a corresponding array of list items to
highlight.
Nathan
http://www.nathanderksen.com
On Jan 30, 2006, at 8:30 AM, Alan MacDougall wrote:
Kent Humphrey 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.
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders