Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 11-20-2010, 07:04 PM   #1
Registered User
Join Date: Sep 2010
Posts: 4
Default Object over an Object


I am trying to make a drag and drop engine in which the dropped item lands on another object.

the problem I am facing is that the bottom object doesn't respond to it's listener while i am dragging the first object above it. I know that I can simply write a Mouse Tracker over the whole stage, but I am wondering if theres a simpler way to just allow the bottom object to notice the mouseover event even though there is another object between the cursor and the object.

Thanks a lot,
albert32 is offline   Reply With Quote
Old 11-20-2010, 09:52 PM   #2
Breaking things...
Join Date: Jan 2010
Posts: 635

AS3 has a provision for hitTestObject or hitTestPoint for it's display objects. You might want to check that out, it sounds like what you're looking for:

jsprclimber123 is offline   Reply With Quote
Old 11-20-2010, 11:01 PM   #3
Senior Member
Join Date: Nov 2009
Posts: 129

I had a scrub bar and a draggle asset. The asset was above the scrub bar so it didnt get events.

Instead of using mouse events while dragging, i got each item to listen if the mouse was within the getBounds() area. That way, its like a work around... if the mouse is inside this boundary... it is a "roll over" and if not, it is a "roll out".

Mine was a little more awkward because i had to translate stage co-ordinates to local coordinates and compare them to the "getBounds() rectangle.
thenine is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 12:20 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.