Answered
EventListener function specific to generated display object container
This has to be simple, if only I knew how. I'm an AS3 newbie,
and am having difficulty setting up multiple specific
EventListeners within a code generated display object container.
I am generating a 'page' (Sprite) with a heap of 'cards' (Sprites) on it. Each of those cards, in turn, contains a selection of text boxes and other objects generated from database output using a 'for' loop.
My hope is to attach an EventListener to each 'card' so that a MouseEvent will let me manipulate the data that lead to the content of that actual card (the i-th iteration of my for loop). I've been playing with everything I can think of (limited repertoire of thoughts though) and the best I've managed is for my EventListener to access the final set of data, whichever 'card' I click on.
I've summarised and attached my code for the function, and would appreciate any advice (however basic) on how to get back to the i-set of data from the EventListener attached to the i-th card. I can handle the PHP and MySQL side of things but am fumbling my way into the OOP of AS3.
Cheers
Dougal
I am generating a 'page' (Sprite) with a heap of 'cards' (Sprites) on it. Each of those cards, in turn, contains a selection of text boxes and other objects generated from database output using a 'for' loop.
My hope is to attach an EventListener to each 'card' so that a MouseEvent will let me manipulate the data that lead to the content of that actual card (the i-th iteration of my for loop). I've been playing with everything I can think of (limited repertoire of thoughts though) and the best I've managed is for my EventListener to access the final set of data, whichever 'card' I click on.
I've summarised and attached my code for the function, and would appreciate any advice (however basic) on how to get back to the i-set of data from the EventListener attached to the i-th card. I can handle the PHP and MySQL side of things but am fumbling my way into the OOP of AS3.
Cheers
Dougal