all groups > flash actionscript > june 2004 >
You're in the

flash actionscript

group:

Select an object and not it's bound box also


Select an object and not it's bound box also jonfludasel
6/24/2004 9:52:10 PM
flash actionscript:
In my application there are several triangles each one represents a food
category (eg. "fruits" is one triangle , "meats" is another triangle etc).
There are several movieclips each one represent a food item for example
"banana" can be one movieclip, "chicken" can be another movieclip etc. The user
moves a movieclip eg. the banana with the mouse (I have used "startdrag"
function) into a triangle and if he clicks to the right triangle ("fruits" in
our case) then a message is displayed to the user in a text box that he is
right. But if he clicks in a wrong triangle then another message displayed to
the same textbox saying that he was wrong. So the triangles in a way are
static. I don't know how to avoid the bound box when the user clicks the
triangle. For the user the object is the triangle and not its bound box. Note
that the triangles are almost attached each other forming a polygon . So their
bound boxes overlap each other. I don't care what object the triangle will be.
I only want to find a solution.
Thanking you in advance for your support.

Re: Select an object and not it's bound box also kglad
6/27/2004 4:22:36 PM
the best solution may be to make your triangles into rectangles and live with
this flash-limitation. an alternative is you embed several small rectangles
over your triangle, give them an alpha of zero (or the same color as your
triangle) and use them with hitTest() on them instead of your triangle.
AddThis Social Bookmark Button