At 4/26/09 11:58 AM, WolfAkela wrote:
Lost at the prototype line, but I got the apply part. The method also returns an Object,
Well it's obviously the same object passed to it. This way you can do the movieclip attaching, forcing and assigning in one line.
which makes me realize something: which one should I even be using to refer to an instance, the stage name or the class instance name? I couldn't even figure how to use the method. Where is the instance name? Where is the MC's stage name? Which should I be using? It returns an object, but how do I access the Box' methods? I tried something like this, but returns undefined:
In case you managed to assume something like 'attach' being a magical builtin function that I use over 'attachMovie' because I'm cool, that's exactly it. Uhuh. Yes.
The force() method kinda feels more like a workaround; is there a proper way I should be doing it?
Yup, it's a straight up hack. There isn't a different way.
All this time I treated my movieclips as classes, and the attached MCs as its instances, but something's telling me that's actually a bad way of doing things.
Treating? That's exactly what they are.
Anyway, you just need to figure out that one out of exactly one things that can be wrong with the code that you pasted, without looking at it, emphasis, and you'll be set.
You need to disassociate your library movieclips with their classes in the linkage because the 'force' function calls the class manually now.