i'm not sure what you're trying to do but, if you're trying to re-parent a movieclip you should consider using as3.
AS3 is not an option, the hardware doesn't support it. But I don't think it would be required.
I would like to clear the canvas of a movieclip, so to speak. Remove any drawing objects on it, but not remove any movieclips that I placed in the movieclip. I want to keep its position (x, y, width, height and depth), but clear it's aprearance so I can draw someting nice (lines, shapes, etc.) in its place.
Drawing the nice stuff isn't the problem, clearing the canvas is.
I would like to create a blue movieclip, just as a marker where actionscript should draw a nicer grey window. But I would like to be able to place other movieclips on it at design time.
At runtime I then would clear the blue box and draw the nice design. But clearing the blue box is exactly what I can't get done. mc.clear(); clears anything I draw on the movieclip it at runtime, but it doesn't clear the graphic shapes I placed on it at runtime
I could make the blue box completely transparent at design time, so it doesn't need to be cleared before actionscript draws the nice design, but that would make the box allmost impossible to use as a placeholder, because I can't see it while designing.
Also deleting the blue movieclip and placing a brand new one in it's place could be an option, if there were a way to keep the motion tweens, children etc. Can I add/move the child mc's of one movieclip to another movieclip? and what about the motion tweens?
These are the two thing I'm thinking of, but I need some help. Or maybe there is a better way?
mc_replace_explanation.gif 42.2 K
if you convert your blue box to a movieclip, you can control it with actionscript during runtime including but not limited to, removing it, making its _visible property false, changing it's _alpha to zero and moving it off-stage.
I do indeed make the blue box into a movieclip, otherwise there woud be no way to manipulate it. Or is there?
But I do not wish to remove the movieclip from screen (by making it transparent, invisible or moving it off stage) because all this would also affect it's children. I just want to clear the blue box.
I could get the desired effect by putting the blue box in yet another mc next to the other content, this way I can remove the blue box without affecting the other content. But that only complicates things, because at designtime I now have to manipulate and empty (thus invisible) container movieclip.
- empty container movieclip
- blue box
- hello world
At runtime I can draw a line on a movieclip and clear that using mc.clear();
but how can I clear (at runtime) a line I drew on that same movieclip at design time?
you can't do exactly what you want.