julifos
02-16-2010, 09:04 AM
Hi all!
This is the stage: I have one hundred of tiles in the stage, instances of the same movie-clip named as "a1", "a2", "a3"...
Now, I set manually some of them to alpha = 0, which means that "tiles" are the walkable path the characters must follow.
Depending on various actions, some of the other tiles will change their alpha value dynamically and so on.
All works fine till now.
Then, when this "round" is finished, I go to a new map (nextFrame()). In this new frame, I have the same tiles, but the walkable path is different (movie-clips in alpha) in the IDE.
But, at run-time, seems that the movie-clips of the second frame inherit the properties (alpha value) of some of the previous dynamically changed tiles (in the previous frame).
I know I could rename the tiles to "b1", "b2"... Or hardcode the walkable path in some kind of Array and apply dynamically.
But I'd prefer to know WHY this happens and how can I prevent it... Why mcs with the same name in the next frame inherit dynamically changed properties in the previous one and how can I prevent this behaviour?
Thanks in advance for any hints!
This is the stage: I have one hundred of tiles in the stage, instances of the same movie-clip named as "a1", "a2", "a3"...
Now, I set manually some of them to alpha = 0, which means that "tiles" are the walkable path the characters must follow.
Depending on various actions, some of the other tiles will change their alpha value dynamically and so on.
All works fine till now.
Then, when this "round" is finished, I go to a new map (nextFrame()). In this new frame, I have the same tiles, but the walkable path is different (movie-clips in alpha) in the IDE.
But, at run-time, seems that the movie-clips of the second frame inherit the properties (alpha value) of some of the previous dynamically changed tiles (in the previous frame).
I know I could rename the tiles to "b1", "b2"... Or hardcode the walkable path in some kind of Array and apply dynamically.
But I'd prefer to know WHY this happens and how can I prevent it... Why mcs with the same name in the next frame inherit dynamically changed properties in the previous one and how can I prevent this behaviour?
Thanks in advance for any hints!