In article <c37v81$ksc$1@forums.macromedia.com>, Dinghus
[quoted text, click to view] <webforumsuser@macromedia.com> wrote:
> Have you done the full path to the array?
>
> Object1.myArray
> Object2.myArray
>
>
Thanks John and Dinghus,
I did tried to initialize the array in the constructor (giving it a
first value there), and the paths are correct. Is the same path I use
to give values to other properties, and they behave properly. I just
don't know why this is happening.
I also buit a very simple case to see if the problem was really there
or somewhere else in my code, but the new test behaved in the same way.
Here is what I have set up:
- I define a class (extending the MovieClip class) with two properties:
a simple variable and an array.
- I also define a stupid method that the only thing it does is push a
value I send along as an argument.
- I create a movieclip in the library, and connected to the Class in
its link section.
- In the timeline, I attach two instances of the movieclip from the
library (through attachMovie)
- then I call the method for them and pass a different value to each
instance
- Then I just "trace" the array on each of them.
- The result of the trace is the same in both cases, and there are the
two values in both arrays, because actually there is only one. Despite
the fact that I call the method to push values with the name of the
instances and not the class. No static property is defined.
I just don't understand, I don't know if I'm missing something here...
Any other clues welcome. Thanks a lot in advance,