Hi Emilio,

About snap an object to a predefined position, just set the loc (or another property as the topLeft, the bottom, etc.) of this object when the user releases the mouse. As for drag and drop, you might be interested by my How-To stack #010 How to drag and drop files and folders.
(It's the same way of doing with objects)
Access it by running in the message box:

go url "http://www.sosmartsoftware.com/downloads/Managing%20Drag%20and %20Drop.rev"

Best regards from Paris,

Eric Chatonet.

Le 2 juin 05 à 00:14, Emilio Gagliardi a écrit :

Hi all,
I want to create a simple screen that allows a user to drag a button from the center of the screen to one of three hotspots and then run some function.

The problem I am having is the interaction between object that I use to define the hotspot (an image) and the button I want the user to move around. I thought it would be best to use an image with a fixed size to define a portion of the card to accept a "drop". However, the messages don't seem to move as I would expect. That is, i can drag the button around no problem, but to detect whether some portion of the button is over the image is proving odd. For example, you I release the mouse outside the image object *on mouseUp* fires correctly and *is within* correctly returns false.

However, when I drag the button over the image and release while over the image, *on mouseUp* doesn't fire at all. The functionality I'm looking to create is a snap-to mechanism that detects whether the button is over any part of the image and then snap the button to a position relative to the image. The end result is that I need to know which buttons were dragged into the three hot zones so I can store that information.

Any suggestions is greatly appreciated.

Cheers,
Emilio

----------------------------------------------------------------
So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Plugins, tutorials and more on our website
----------------------------------------------------------------
Web site        http://www.sosmartsoftware.com/
Email        [EMAIL PROTECTED]/
Phone        33 (0)1 43 31 77 62
Mobile        33 (0)6 20 74 50 86
----------------------------------------------------------------

_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to