Don’t scale the child movieClip

flashmoviecliprotationscalingtranslation

I have a question of how to transform the parent movieclip and not the child movieclip…I have a movieclip holding an image loader and some handles as a movieclip. The handles movieclips are used to listen the mouse event to do such function scaling rotation and translation of the parent movieclip. The problem here when I scale or rotate the movieclip the handles also rotate and scale although I want it to follow the parent movieclip while the parent movieclip is rotating but I don't want handles to scale as well.

Is there a way of avoiding the handles from scaling.

Thank you

Best Answer

Try this:

inside_mc.addEventListener(Event.ENTER_FRAME, function(){
    inside_mc.scaleX = 1/inside_mc.parent.scaleX;
    inside_mc.scaleY = 1/inside_mc.parent.scaleY;
});
Related Topic