Hi there.
Basiclally a simple thing, however i dont get an idea on how to solve this one:
Say I have a sprite which is already existing during runtime and at some certain point I want to attach some custom data to it, say, in a string.
How would I do that?
s:Sprite = new Sprite();
s[“extra”] = … gives me an error, so i got exactly that far till here.
s.name is already reserved for another string and for sure I thought about just adding a TextField with the string inside to it, like
s.addChild(myStringTf);
But I know there is a better way, I just cant find it.
hasOwnProperty() just returns a boolean true in case i match the value already assigned to it, right? Isn’t there a way to attach an annonymouse object to it? A little hint would be so apprecheated.
Best regards,
zoimt