View Full Version : change or set size/dimensions, not scale..!
bcswebstudio
August 27th, 2008, 11:48 PM
This isn't even an AS2 question-- it's about the IDE. How can I set a mc's _width and _height properties without affecting its scale?
I drew a rectangle, and to fit it to the proper dimensions, I set its width/height in the properties pane, but lo and behold, Scale got jacked. This has got to be a simple operation, but I'm not seeing it.....
thanks!
bcswebstudio
August 27th, 2008, 11:51 PM
By golly.. Would someone please confirm that the proper procedure is to set the shape's property "Scale" dropdown to "None" (defaults to Normal), then set the width/height, then set Transform/scale to 100%, then set "Scale" back to Normal?
snickelfritz
August 28th, 2008, 03:52 AM
The scale dropdown refers to the stroke thickness.
ie: if you scale a stroked shape, the stroke can either scale up with the shape(normal) or remain fixed at its current value(none).
bcswebstudio
September 2nd, 2008, 11:40 PM
I wonder what it is, then, along with having clicked that that finally gave me the results I was looking for? It seems I was "stuck scaling" until I did toggle that option, then my shape miraculously allowed resizing. Maybe somewhere along I jumped between transform and selector?..
bcswebstudio
September 23rd, 2008, 12:37 AM
Ok, well as always logic prevails, and in fact setting the "scale type" dropdown was just a red herring in my quest.. a coincidence that threw me off the trail. As it were, I am in this situation again, needing to resize to precise dimensions without rescaling.
Any ideas?
tugboat
September 23rd, 2008, 02:48 AM
I'm wondering if I've understood:
Let's say you have a movieClip called rectangle_mc that contains a graphic of a rectangle that is 100 pixels wide by 100 pixels high.
Now let's say you create an instance of this movieClip on the main timeline and name it "rectangle_mc".
Now you want to change its width and height.
So you type into the actions panel:
_root.rectangle_mc._height = your desired height in pixels;
_root.rectangle_mc._width = your desired width in pixels;
This should work. One thing I find confusing is your use of the term scale. It seems to me that changing either the height of the movieClip or its width IS changing its scale.
But maybe you meant that you didn't want to use the ._xscale or ._yscale properties. Which I do understand.
Please let me know if I've totally misunderstood your post, because I'll delete my post. No reason to clutter this up with non-responsive info.
T
bcswebstudio
September 23rd, 2008, 10:41 AM
Yes, exactly*, but not via AS but instead via the IDE's "Properties" or "Info" panes. If I nudge the numbers there, I click over to the Transform tab, and I see that the 100% has gone to, say, 94.6%.
I think resize and scale differ in that one involves math upon a base object, whereas the other is actually setting the dimensions of the base object.
* - it needn't be a mc. In fact, in this case it's just a drawn shape: I draw a shape out, then I tweak the values in the properties or info panes.
tugboat
September 23rd, 2008, 11:16 AM
So, you draw a rectangle on the stage. Then, in the properties pane you change one/both of its dimensions, and the transform tab communicates to you the percentage change you've just made.
I guess, then I don't see the problem. Are you not ending up with the shape in the exact dimensions you want them to be? Since it is just a drawn object, and not a library item that you'll be re-using, does the feedback from the transform tab matter?
I'm just trying to understand the issue. But if anyone else is reading this and does get it, please let me know.
dshaban
September 23rd, 2008, 11:26 AM
I'm trying to understand this as well. It seems like you're problem is because it's changing the % of either the width or height in the transform panel when you make an adjustment in the properties panel?
For example, when I just made a few tweaks to a shape (adjusting the width in properties) I notice the transform "scale %" is adjusted depending on the new width. Once I click off of the shape, and click back onto it, the % is back at 100%. I'm wondering if this is the issue? Or the issue with having it display the adjusted % during the transformation. As the new shape has it's "scale" set back to 100% after the "transformation" has been completed.
Not sure if this will help out at all. But hopefully it can trigger some sort of solution.
dave.
snickelfritz
September 23rd, 2008, 02:44 PM
Tweening classes are an easy way to adjust the scale of an object without permanently changing its width or height properties.
ie:
TweenLite.to(mc, 1, {scaleX:.5, scaleY:.5});
//the scale of "mc" is now .5 or half the orginal.
TweenLite.to(mc, 1, {scaleX:1, scaleY:1});
//the scale of "mc" is restored to its original size.
Honestly, I don't see any potential problems with this approach.
I'm guessing there must be a hidden context to the question.
bcswebstudio
September 23rd, 2008, 03:34 PM
dave-- you've got it! I haven't tried it myself yet, but what you observed makes sense and alleviates my concerns: if resizing "scales" but then clicking off and back on reveals that the new size is in fact 100%, then that's the ticket-- it's a non-issue.
Thanks all for your attention on this trivial little matter.. As a software developer first and designer beyond second, I get caught up on the little details..
dshaban
September 23rd, 2008, 05:57 PM
Glad it was something we were able to help out on! Enjoy.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.