I don't understand what you're suggesting.  The user is not dragging
the movieclip.

The idea is to write a function with a signature like:
function getObjectAtPoint(xmouse:Number, ymouse:Number):Object



On 2/5/07, Erik Bianchi <[EMAIL PROTECTED]> wrote:
Been a while but I believe the solution you need is startDrag with
_droptarget.

Note you must use startDrag otherwise _droptarget isn't set.

-erik

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Vishal Kapur
Sent: Monday, February 05, 2007 4:52 PM
To: Flashcoders mailing list
Subject: [Flashcoders] determining which object is displayed at a given
point

I am trying to solve the following problem: given the coordinates of a
point in a flash movie, determine the targetPath of the object that is
currently displayed at that point.  In simple cases I have been able
to do this by looping through a list of possible target objects and
calling hitTest() on each one.

However, issues arise when there are multiple objects for which
hitTest() returns true.  This can happen with hidden objects, or more
often, objects sitting on layers that aren't currently visible.
Sometimes I can compare the depth of 2 conflicting objects, and I
assume whichever one has a larger depth is rendered in front of the
other.  This doesn't always work, however.  I am debugging a case
where there are two objects that return hitTest()=true, have identical
depths, have identical bounding boxes, and both have _visible set to
true.  Only one of them is actually visible to the user at any given
time, however.  What other properties of a movieclip can be checked to
determine if it's really the one that the user can currently see?  Or
is there a better way to do this, rather than using hitTest()?

Let me know if I can clarify.

Thanks,
Vishal
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to