Clicking on moving objects
I need help.
I have numerous objects bouncing around the frame and the user needs to click on each object in a specific order.
The problem is that the event is triggered even if the user clicks on an object that happens to be over the correct object.
In other words, let's say the next object the user is supposed to click on is Object 2 but just when the user is about to click on Object 2, Object 5 (or any other object) flies in front of Object 2 and the user ends up clicking on Object 5, it still triggers the event for Object 2 because Object 2 is underneath Object 5.
I need it to only trigger the event if the user clicks on the actual correct object and not if the user clicks on an object that is on top of the actual object.
Hope I explained it clearly.
Any help would be appreciated.
Adrian
Re: Clicking on moving objects
Try the "Select Object": http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=175675#Post1756 75
It has a "Select Topmost Object" condition, but there's a gotcha with using it for clicking on objects. Check the help and/or the example that comes with it.
Note: Not Flash/Java compatible.
Re: Clicking on moving objects
Perhaps you could insert another condition:
if mouse is not over an object
Seve
Re: Clicking on moving objects
Re: Clicking on moving objects
Sorry, I read it too quickly and misinterpreted what you were asking for. It would seem that you need to have each object identified(by spreading a value) and then check to see which object is "next."
Steve
Re: Clicking on moving objects
I couldn't get the SelectObject to work so I just prevented the objects from overlapping this way the user can only click on one object at a time. Now the objects bounce off each other rather than crossing over each other. Not exactly what I planned but still good.
Thanks,
Adrian
Re: Clicking on moving objects
The select object doesn't work with "User clicked on object", instead you have to use "user clicked" + "mouse is over object". It's annoying but there's nothing I can do about it. The help file tries to explain why.