Farsue Posted September 8, 2006 Share Posted September 8, 2006 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 More sharing options...
smiles Posted September 11, 2006 Share Posted September 11, 2006 dont understand much :)just think it move a symbol named instanceName form beginning coordinate (x,y) to coordinate (targetX,targetY) while its body become bigger and bigger ( or smaller )you can make this effect without script Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now