So let’s say that the user drags four instances of an object on stage (this is an object from the library). Now when the user clicks on one of these objects I want to “attach” a class to that object so that it has its own variables that will stay associated with that object. Then when the user clicks on one of the other objects, that class is “attached” to it.
I am trying to associate arrays or maybe dictionaries with these objects on stage.
Is it simply something like this when the user clicks on one of the objects:
funtion handleClick(evt:MouseEvent):void
{
evt.currentTarget = variableStorageClass();
}
And then pass it the information for the variables/arrays?
Also, how do you retrieve the variables when you need them?