# Events（事件）

此类别的拼图处理用户生成的事件：鼠标点击/触摸，悬停和拖动。

![](https://www.soft8soft.com/docs/files/puzzles/puzzles-events.jpg)

### "**when clicked" - 点击时**

等待用户点击指定的3D对象（或在列表或组里的任何物体，或在启用“[all objects](https://docs.eightest.com/selectors#all-objects-suo-you-dui-xiang)”拼图时场景里的所有物体）——然后在“do”插槽中运行拼图，或者如果用户点击其他内容则在“miss: do”插槽中运行拼图。

![](https://www.soft8soft.com/docs/files/puzzles/puzzles-events-when-clicked.jpg)

### **"picked object" - 选择的对象**

返回用户单击的对象。与“点击时”("when clicked")拼图一起使用。

![](https://www.soft8soft.com/docs/files/puzzles/puzzles-events-picked-object.jpg)

### **"when hovered"**

Waits until a user hovers over/out a specified 3D object (or any object in a specified list or group, or any object on the scene if the [all objects](https://www.soft8soft.com/docs/manual/en/puzzles/Selectors.html#all_objects) puzzle is used) - then runs puzzles in the "over/out: do" slot.

![](https://www.soft8soft.com/docs/files/puzzles/puzzles-events-when-hovered.jpg)

### **"hovered object"**

Returns an object a user has hovered over. Intended for use with the "when hovered" puzzle.

![](https://www.soft8soft.com/docs/files/puzzles/puzzles-events-hovered-object.jpg)

### **"when moved"**

Tracks any movements (position, rotation and scale) of a specified object (or any object in a specified list or group, or any object on the scene if the [all objects](https://www.soft8soft.com/docs/manual/en/puzzles/Selectors.html#all_objects) puzzle is used). Runs puzzles in the "start: do" slot if an object started moving, keeps running puzzles in the "while moving: do" slot until an object stops moving, then runs puzzles in the "stop: do" slot. The "delta" parameter denotes an absolute change of any coordinate (x, y or z) of either of position, rotation or scale that is required to trigger this puzzle. The "period" parameter denotes how many rendering frames should the puzzle wait before checking movements again.

![](https://www.soft8soft.com/docs/files/puzzles/puzzles-events-when-moved.jpg)

### **"when dragged"**

Waits until a user drags over a specified 3D object (or any object in a specified list or group, or any object on the scene if the [all objects](https://www.soft8soft.com/docs/manual/en/puzzles/Selectors.html#all_objects) puzzle is used) with the mouse or a touch gesture - then generates movement data for using in a "drag move", "drag rotate" or "drag scale" puzzle. Also captures events of started and stopped dragging.

![](https://www.soft8soft.com/docs/files/puzzles/puzzles-events-when-dragged-over.jpg)

### **"drag move"**

Moves a specified 3D object (or all objects in a specified list or group, or all objects on the scene if the [all objects](https://www.soft8soft.com/docs/manual/en/puzzles/Selectors.html#all_objects) puzzle is used) in accordance to dragging movement data generated by the [when dragged](https://www.soft8soft.com/docs/manual/en/puzzles/Events.html#when_dragged) puzzle. Use the drop-down menu to limit the movement to a particular axis or plane, or not to limit at all.

![](https://www.soft8soft.com/docs/files/puzzles/puzzles-events-drag-move.jpg)

### **"drag rotate"**

Rotates a specified 3D object (or all objects in a specified list or group, or all objects on the scene if the [all objects](https://www.soft8soft.com/docs/manual/en/puzzles/Selectors.html#all_objects) puzzle is used) in accordance to dragging movement data generated by the [when dragged](https://www.soft8soft.com/docs/manual/en/puzzles/Events.html#when_dragged) puzzle. Use the drop-down menu to limit the rotation to a particular axis. The "space" drop-down allows for switching between "local" and "parent" coordinate spaces.

![](https://www.soft8soft.com/docs/files/puzzles/puzzles-events-drag-rotate.jpg)

### **"drag scale"**

Scales a specified 3D object (or all objects in a specified list or group, or all objects on the scene if the [all objects](https://www.soft8soft.com/docs/manual/en/puzzles/Selectors.html#all_objects) puzzle is used) in accordance to dragging movement data generated by the [when dragged](https://www.soft8soft.com/docs/manual/en/puzzles/Events.html#when_dragged) puzzle. Use the drop-down menu to limit scaling to a particular axis.

![](https://www.soft8soft.com/docs/files/puzzles/puzzles-events-drag-scale.jpg)
