Groups | Blog | Home
all groups > flash actionscript > december 2005 >

flash actionscript : Wire hit test actionscript



3tBSI
12/26/2005 2:59:02 PM
I have a red wire with an instance name of: rw1
I have a green wire with an instance name of: gw2
I want it so when the red touches the green wire, it goes to the next frame
I have tried Hittest actionscript with them but it wont work.
can someone give me the AS.
kglad
12/26/2005 4:16:57 PM
Peter
12/28/2005 1:48:50 AM
This should do the trick I believe:

if(rw1.hitTest(rw2._x,rw2._y,true)) {
gotoNextFrame();
}

- Peter



[quoted text, click to view]
AddThis Social Bookmark Button