Move Object to Cursor Action

image\Action_Move_To_Cursor.jpg

The Move Object to Cursor action is used to move the specified object to the current position of the cursor.

Note:
 This action is often used with the Mouse Move trigger – every time the mouse moves, the object you have specified in this action will follow the user’s mouse movement. This is especially useful when creating games, for example, a ship navigating through a maze trying to avoid crashing into objects. However, this action may be used with any trigger and for other activities as well.

Setting up the Move Object to Cursor action:

1. Add the Move Object to Cursor action to your trigger, as described in adding actions. The Move Object to Cursor tab will automatically appear when you add the action.

Note:
The Mouse Move trigger is often used for this action, although any trigger can be used.

2. Click on the name of the object in the object list that you want to move to the cursor position. The object list contains all of the objects on the page.

Note:
Only one object can be selected in the object list. When the action is triggered, the centre point of the specified object will appear at the centre of the cursor. The cursor will still appear over the top of the object.

3. Click on the Apply button to save your changes.

Note:
 If you want to hide the cursor when using this action you can either: (a) set the Mouse Over Cursor option to None in the specified objects Cursors tab in the Properties dialog; (b) use the Hide Cursor action to hide the cursor before or after using the Move Object to Cursor action.

Related Topics:

Cursor Properties

the Hide Cursor action

Choosing an Action