PDA

View Full Version : Scale Tween MC W/ Dynamic Width & Height



MattyG
March 28th, 2007, 05:41 PM
I would like to use the tween class to scale a movie clip. The problem is from what I've seen I have to enter a starting scale, and an ending scale for a movie clip.

ex.
new mx.transitions.Tween(redBall, “_xscale”, mx.transitions.easing.Strong.easeOut, 100, 200, 30, false);

Well my movie clip resizes based on the browser so I'm not sure what the actual starting scale value is. I am resizing the image but maintaining the aspect ratio.

What should I do? Can I use the tween class still?

MattyG
March 28th, 2007, 05:51 PM
Nevermind, I guess I spoke too soon! If anyone is interested here's what I did basically:



var ogYScale = bg_con._yscale;

var ogXScale = bg_con._xscale;

new mx.transitions.Tween(bg_con, "_xscale", mx.transitions.easing.Strong.easeOut, ogXScale, ogXScale+20, 30, false);

new mx.transitions.Tween(bg_con, "_yscale", mx.transitions.easing.Strong.easeOut, ogYScale, ogYScale+20, 30, false);