Search Tutorials
The x axis is the horizontal line and the y axis is the vertical line. The variable "red_x" contains the x coordinates of the instance of the movie clip red. The variable "red_y" contains the y coordinates. The next 2 lines of actionscript do the same for the instance of green. It sets up the x and y coordinates like so.
Set Variable: "green_x" = GetProperty ("/green",_x)
Set Variable: "green_y" = GetProperty ("/green",_y)
The next 4 lines of actionscript get the height and the width of both movie clips, red and green.
Set Variable: "red_h" = GetProperty ("/red",_height)/2
Set Variable: "green_h" = GetProperty ("/green",_height)/2
Set Variable: "red_w" = GetProperty ("/red",_width)/2
Set Variable: "green_w" = GetProperty ("/green",_width)/2
The next 2 lines of actionscript set up 2 variables for distance . Set Variable: "distance_x" = red_x-green_x Set Variable: "distance_y" = red_y-green_y
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|