PDA

View Full Version : HELLLLLP!


Daverulz
04-24-2001, 09:16 PM
ok, i am trying a collision detection and heres what i have...
but when i switch to normal mode (in the actionscripts window, it gives me an error... any ideas why...
The error reads: Scene= MAIN, Layer= Layer 1, Frame= 1 Line 1 ';' expected
Set Variable: "red_x" = GetProperty ("/red",_x)



Set Variable: "red_x" = GetProperty ("/red",_x)
Set Variable: "red_y" = GetProperty ("/red",_y)
Set Variable: "green_x" = GetProperty ("/green",_x)
Set Variable: "green_y" = GetProperty ("/green",_y)
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
Set Variable: "distance_x" = red_x-green_x
Set Variable: "distance_y" = red_y-green_y
Set Variable: "area" = (red_h+red_w)*(green_h+green_w)
If (distance_x*distance_x+distance_y*distance_y<=area)
Set Variable: "/:status" = "Collision Detected"
Else
Set Variable: "/:status" = "No Collision Detected"
End If


PS: i found the tutorial on this site
Please HELP ME!!!

the_wizard
04-25-2001, 12:15 AM
http://www.macromedia.com/support/flash/

Jesse
04-27-2001, 09:13 AM
Are you using Flash 5? That code is Flash 4 code... if you copy it into Flash 5 you're going to get a million errors.

Cheers

Jesse