This content has been marked as final. Show 4 replies
You can use the hitTest function. It evaluates if the two movieclips are "covering" eachother. I include a very simple example, which should off course be altered...
Hmmm, I should have mentioned that the photo?_mcsare being created with attachmovie at runtime.
So are you saying the only way to idenitfy what is below the ball_mc is to know beforehand what the candidates are, throw those into an array and then increment through that array each time it passes over an object to see if there is a fit? And if so what is the event that triggers the process
you'll need a loop that repeatedly executes to check that hitTest(). and you don't need to use an array of your movieclips hard-coded with movieclip candidates. you can simply loop through all movieclips on a particular timeline (or all timelines, if you wanted).
This may be more of what you're looking for. However, keep in mind that it's deprecated.
var over:MovieClip = eval(ball._droptarget);
textbox.text = over._name;
This is what I'm using to do some drag-and-drop functionality where the object being dropped on needs to change state as the object being dragged floats over it.