|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
'intersect' command?
I'm in need of some help.
I'm trying to finish up some functions on a scrolling interactive timeline. I have the basic functions down, but what I need to happen is: 1. ...the thumb sprite to 'intersect' with another object in the thumbtrack when it (thumb) is dragged AND when an arrow button is clicked to move the thumb. -Both of these would key a object to appear or jump to a frame label. I can't find the actionscript for this 'intersect' action? I don't know the command word for it. If someone can at east tell me the command word for this, it would be great anything will help, GT I've included a link to the file I'm working on: URL |
|
#2
|
|||
|
|||
|
i believe what you are looking for is the hitTest method.
Code:
if(square_mc.hitTest(_root._xmouse,_root._ymouse,true)){
//do something
}
this will check to see if the square_mc intersects the mouse. the "true" at the end tells flash to use the bounding box of the target or the hit area (Defined be the actual shape of the object). hitTest can also just return if two objects are intersecting: Code:
if(square_mc.hitTest(circle_mc)){
//do something
}
this is all going off of instance names of movieclips -bret |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > 'intersect' command? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|