Attaching and retrieveing data with instance names?


My first post here at Kirupa! I’m quite new to AS3 so please bare with me :slight_smile:

I’m developing an AS3 module where the user interacts with certain hardware. One part is highlighting the hardware’s features when the user hovers certain points on it. There’s quite a lot of work to be done here (about 6 modules with about 30 highlights each) so I figured I would make it as changeable as possible.

On the stage I’ve placed all instances of a movieclip that acts as the pointer for the highlights. This movieclip uses a class that animates it upon mouseover/mouseout (hence only two animation functions are required for them all). At the same time I want to display a unique text for every point, and this is where the trouble comes in.
I figured I could attach data with each instance to the class somehow, and then create a new text field upon accessing the class. This is what I came up with:

// Features = "Växla mellan användnings- och viloläge."; = "Display."; = "Visa den elektroniska programguiden."; = "Visa huvudmenyn."; = "Lämna menyn."; = "Infraröd sensor (för fjärrkontroll)."; = "Inspelningsindikator - lyser när inspelning pågår."; = "Spela in."; = "USB-anslutning för externt minne."; = "Kortläsare till ditt programkort."

As you can see I tried using the instance property name to attach the data, it failed though (I didn’t get a compile error for this but I couldn’t retrieve the data in the class).
How would you approach this? Do I have to create a variable for each instance’s data, then match them (same number etc.)? Or is there a simpler way?