I posted this in Kirupa but unfortunately i did not receive any response from the community for 4 days now. I'm thinking perhaps somebody here can answer my long awaited explanation for this bug or phenomenon. I have a shape animation on the timeline from one keyframe to the next (3 keyframes). There is an orange movieclip under that mask with instance name "container". Now if i attempt to attach a movieclip to it at runtime, it will automatically get removed when it reaches the 2nd shape tween keyframe. Please see the simple demo i attached. All my code is in frame 1. Isn't that illogical? I know it works if i place it into a movieclip. I need an explanation to this (if its a bug) and a workaround other than repetitively attaching it from frame to frame.
I can't say if it is a bug. I could consider it to be along the lines of an anomoly... being just the way it works... Flash has at least a couple. It is possible that what you are trying to do defies the way masking is designed to be done. The solution is to create the mask as a moviecip and place it in frame 1 and extend it to the end of the timeline.
If you are interested in pursuing it to see if it is a bug, you should submit it to Adobe via:
though I don't know if they report back to you on it. There is an Adobe employee that sometimes frequents the Flash Discussions forum that has an interest in the discovery of Flash bugs. You'll find that person participating in the following thread, so you might try starting a new post in that forum or just try a private message to that person:
Yeah, i had no choice but to reluctantly do it that way. It is really inconvenient because if i wanted to play another part of the timeline i would have to instruct that shapetween in the nested movieclip to jump to that frame too. Thanks for the helpful advise.