Source language: Translate to:

Drag and Drop Problem...

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Drag and Drop Problem...

Postby lesanchss » Mon Feb 26, 2007 1:35 pm

Hi Friends,

When i do a drag and drop with an simple text object over an rectangle object how can i disable that others text objects will be dragged over the same rectangle object??

Ex:
10 simple text object contained the words with the answers.
only 3 rectangles objects to accept the only 3 possibilities.

When simple text object number 1 is dragged and dropped over the rectangle object number 1, the rest of the simple text objects can't be dropped over the same rectangle object number 1.


Thank,
Lesanch.
Todos somos ignorantes, solo que no todos ignoramos las mismas cosas.
Albert Einstein.
.
. .
User avatar
lesanchss
 
Posts: 24
Joined: Wed Sep 20, 2006 12:38 pm
Location: Cuba

Postby Gaev » Mon Feb 26, 2007 2:06 pm

lesanchss:

From the Help file (for the Hotspot/Polygon object) ...
If you’ve enabled either the Manual or Automatic Drag and Drop Modes above, you can use the special “Drag Drop” Action to control exactly what happens at the end of the drag and drop operation. NeoBook triggers the Drag Drop Action when the object is dropped. If you do nothing, NeoBook will move the object to the new location provided the specified Drag Mode criteria has been met. However, just before the Drag Drop Action executes, NeoBook will initialize the following special variables which can be used to influence how the drop operation is completed:

[DropAccept] Setting this variable to “False” will cancel the drop operation. For example:
SetVar "[DropAccept]" "False"

Also, if you specified a drop target for this operation (Automatic mode), you can override that and allow the object to be dropped anywhere by setting this variable to “True”. (See the SetVar Action for information on how to set variables.)

[DropX], [DropY] This is the proposed new location for the dropped object. You can change these coordinates to affect where the object is placed.

[DropTarget] If the drop occurred on top of one of your specified drop targets, this variable will contain that object’s name.

So you can keep track of history in your own variables ... and when no more objects can be dropped on a particular Rectangle object, set the variable [DropAccept] to "False" before exiting from the routine.
User avatar
Gaev
 
Posts: 3738
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest

cron