I am trying to write a script that will scale an object on the screen as the mouse curor gets closer to another object's instances. I am using this script as b-clip in a button movie. The following only scales to 1 of the instances and ignores the others. Can anyone help me with this?
point1x = _parent._x
point1y = _parent._y
point2x = _parent._parent._xmouse
point2y = _parent._parent._ymouse
1 = (point1x - point2x)
2 = (point1y - point2y)
distance = math.sqrt((1*1) + (2*2))
setProperty ( root.sphere,_xscale,distance)
setProperty ( root.sphere,_yscale,distance)
point1x = _parent._x
point1y = _parent._y
point2x = _parent._parent._xmouse
point2y = _parent._parent._ymouse
1 = (point1x - point2x)
2 = (point1y - point2y)
distance = math.sqrt((1*1) + (2*2))
setProperty ( root.sphere,_xscale,distance)
setProperty ( root.sphere,_yscale,distance)