PDA

View Full Version : AS2 animation: xscale/yscale problem


timshaya
01-31-2008, 11:21 PM
I'm having trouble animating these rectangles with AS2.

Got as far as making a plain _x motion, left to right. It's a bit jittery but it does the basic job for now (http://www.timshaya.com/zips/moving_plain_1.html) (viewable) | zip w/fla (http://www.timshaya.com/zips/moving_plain.zip).

Things start looking really wacky when I try to add _xscale, yscale into the mix. I want the rectangles to scale and move from left to right within the yellow lines. Here's the example (http://www.timshaya.com/zips/moving_skewed_4.html) (viewable) and the zip (http://www.timshaya.com/zips/moving_skewed.zip) with .fla...

Does anyone have any suggestions on how to fix this?

Thank you very much in advance for any ideas!

timshaya
02-01-2008, 06:46 PM
I'm rereading my basic trig & motion physics chapters from dusty old books... am I at least thinking in the right direction?

raskolnikov
02-26-2008, 08:41 AM
think simple. u dont need trigo unless u dealing with collision mostly.
i would chuck the script away and do it again with frame tween and animation. haha but that's just me.

or

make a mask and have boxes move under it. so can still script but only much simplier , movement in y direction and no need to scale at all?

or

try isometrics to keep scaling easy. good luck.

christian