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

Hi,

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,
A.E.
albert32 is offline   Reply With Quote
Old 11-20-2010, 08:52 PM   #2
jsprclimber123
Breaking things...
 
Join Date: Jan 2010
Posts: 635
Default

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:


http://livedocs.adobe.com/flash/9.0/...hitTestObject()
jsprclimber123 is offline   Reply With Quote
Old 11-20-2010, 10:01 PM   #3
thenine
Senior Member
 
Join Date: Nov 2009
Posts: 129
Default

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
Reply


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 05:56 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, 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.