PDA

View Full Version : Quick Question


DigiScript
02-05-2001, 09:27 PM
In the Mask follows Mouse tutorial, what exactly is happening here?

// Move the masked object by exactly the opposite amount
this.masked_object._x = (20-x);
this.masked_object._y = (30-y);

I assume it means exactly the opposite amount as the mouse, but I don't get it... where does the 20 and 30 come from?
And if the mouse is at 400, 100, shouldn't the object disappear by going to -380, -70??

I know this is simple, so why can't I understand it ....?

Strok
02-05-2001, 09:51 PM
It is a position for Masked object.

DigiScript
02-06-2001, 04:13 PM
I know, but where do the values (20 and 30 for x and y) come from?

Strok
02-07-2001, 01:00 AM
src="http://www.actionscripts.org/help/stuff/20x30.swf" quality=high width="200" height="100"

[Edited by Strok on 02-06-2001 at 07:06 PM]

DigiScript
02-07-2001, 02:07 PM
Thanks Strok