This content has been marked as final. Show 8 replies
you've got to instantiate the my_array variable as a Array rather than just typecasting it.
var my_array:Array = ;
or var my_array:Array = new Array();
Omg. I fiddled with this and apperently did just that. That would explain why it's doing soemthing now,
It's still not working properly. I have three objects, and I set the first spot in each to three different things, but when I trace them all of the array values are set to the same value as the last object. No code modifies them after they are set. I checked.
It's sure behaving like a static property.
Each object should have a unique array property, but it behaves like the property is the same for all objects. What I mean is when I change the array at postion 0 for each object, it acts like I'm modifying the same array value three times.
Why isn't it independent?
I'm still open on this question...
just need to show the code, sounds like it needs a minor tweak
The class is shown. There is a movie clip in the library with its class set to "crate." I drag an instance of this MovieClip into another clip and say the code following the class. I get "item2" and not "item1."
Having just finished my only AS side project, I will now attempt this the hard way.
I'm going to create five different string properties for the crate class, and use those instead.
And if that doesn't work I'll have to go back to that one animation I was doing.
Amazing. Said hard way is independent.