View Full Version : prevent child from scaling
ghostmonk
October 2nd, 2007, 11:10 PM
I want to add a child to a movieclip that I am scaling.
However, I would like to prevent that child from scaling when the parent scales.
I know there is a way to do it, but I can't find the solution in my notes.
Anyone have any ideas?
rhamej
October 3rd, 2007, 11:49 AM
Can't be done. But if you are talking about the scale 9 thingy where it won't scale the border, then that is in the pop up box when you convert it to a mc.
BradLee
October 3rd, 2007, 11:59 AM
You could always just adjust the scale of the child object to make it look like it hasn't changed scale.
Something like this...
child.scaleX = 100/parent.scaleX;
child.scaleY = 100/parent.scaleY;
Or something like that...
People generally don't like it when you post the same question multiple times in different sections of this forum. It's called cross-posting and it's frowned upon heavily.
ghostmonk
October 9th, 2007, 03:51 PM
thanks for the solution and the policing, constable Brad
jfabris
November 16th, 2010, 03:46 PM
Can't be done. But if you are talking about the scale 9 thingy where it won't scale the border, then that is in the pop up box when you convert it to a mc.
How does the List component work then? You can scale that and it doesn't mess up the text.
senocular
November 16th, 2010, 03:56 PM
How does the List component work then? You can scale that and it doesn't mess up the text.
That's resizing, not scaling, and its all handled dynamically through ActionScript.
jfabris
November 16th, 2010, 04:02 PM
That's resizing, not scaling, and its all handled dynamically through ActionScript.
It seems like the List component is doing exactly what GhostMonk (and I) want to do.
senocular
November 16th, 2010, 04:40 PM
You can check to see how the List class does it if you're interested in that approach
<Flash Install>\Common\Configuration\Component Source\ActionScript 3.0\User Interface\fl\controls\List.as
<Flash Install>\Common\Configuration\Component Source\ActionScript 3.0\User Interface\fl\core\UIComponent.as
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.