Flash CS3 Hittest/droptarget help, please

  • cato288
  • Born
  • Born
  • cato288
  • Posts: 1

Post 3+ Months Ago

Greetings,

I have been trying to figure out how to do a project in Flash CS3. I can figure it out.

I would like it so when a line <instance name: dem_drg> is clicked on it moves, then when it is released, it stops moving. Then I would like to see if it is dropped in a certain area <instance name: answer>. If it does, then I need to have a output "good" or something like that

The line's boundary box and the answer's boundary box are always going to be touching one another, so it would have to take into account shapeflag somehow.

This is what I have so far, and it says "good" every time I drop the dem_drg, probably because it takes into account the boundary boxes.

//start
on (press) {
startDrag(dem_drg, true, 225, 125, 350, 250);
}
on (release) {
stopDrag ();
if (dem_drg._droptarget == answer) {
trace ("good");
}
}
//end

How can I take into account the boundaries when doing a droptarget or hittest?

Thanks!

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 11 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.