Hallonduell
February 14th, 2008, 12:58 PM
I have a container movieclip in my library (player) on each frame in that movieclip there is another movieclip, that movieclip holds an animation (idle,walk etc etc). All animations contains the same parts (head, torso, rightleg etc etc).
The thing I want to do is to add a loaded movieclip onto the head ie. I want to add a hat onto the head of the player. Atm I do as follows:
player.idle.head.addChild(loaded_mc)This works fine as long as the player is idle but as soon as he moves (changes frame to walk) the hat disappears, this I can acceept because I added the hat to the idle instance.
The thing I want to do is to add the hat to all instances of the head movieclip so that it doesn't disappear when I change from one animation to another.
If there is no way to do that then I wonder why the hat is removed totally when the frame changes. When the player gets back to the idle frame the hat is still missing. I don't know if this have anything to do with the garbage collector or something like that, hope someone knows :)
The thing I want to do is to add a loaded movieclip onto the head ie. I want to add a hat onto the head of the player. Atm I do as follows:
player.idle.head.addChild(loaded_mc)This works fine as long as the player is idle but as soon as he moves (changes frame to walk) the hat disappears, this I can acceept because I added the hat to the idle instance.
The thing I want to do is to add the hat to all instances of the head movieclip so that it doesn't disappear when I change from one animation to another.
If there is no way to do that then I wonder why the hat is removed totally when the frame changes. When the player gets back to the idle frame the hat is still missing. I don't know if this have anything to do with the garbage collector or something like that, hope someone knows :)