Jump to content

Actionscript question


Farsue

Recommended Posts

If someone could explain what exactly this code is doing, I'd really appreciate it. I know it's scaling and moving the image I just don't understand what the point of all the math is and why you wouldn't just pass the value you wanted. confused... thanks for any help :)function moveAndScale(instanceName, targetWidth, targetHeight, targetX, targetY, factor) { instanceName._x += (targetX-instanceName._x)/factor; instanceName._y += (targetY-instanceName._y)/factor; instanceName._width += (targetWidth-instanceName._width)/factor; instanceName._height += (targetHeight-instanceName._height)/factor;

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...