View Full Version : Selecting an object based on a X,y location

05-10-2006, 02:27 AM
Im trying to make a tool that pretty much acts like the selection tool, but with more features. But I cant figure out how to select an item within the workplace based on its x,y position. I have the X,Y position, but how do I look up whether im clicking within an object -- without having to go through all elements on stage and checking their bounding box?

Its got to be easier/quicker than a loop that checks every element on the stage. Lemme know.

Thanks, Chris

05-10-2006, 06:52 PM
edit: didn't notice it was posted in JSFL forum

05-11-2006, 12:20 AM
What about document.mouseClick()? It does the same thing as a single-click from the normal selection tool.

I'm interested in your progress on this, I've tried making a custom selection tool myself but I had some trouble getting the selection rectangle to work, and I got too busy with other things to finish it.

05-11-2006, 05:19 AM
This seems promising! Thanks...

Ill definitely let you know how this turns out.