# イベントメソッド

### on (event\_name, callback\_function)

**対象プレイヤータイプ：v3,v4**

> イベントリスナーを登録します。
>
> ```javascript
> controller.on('event_name', function(param) {
>   // event_nameに該当するイベントが発生したとき、2番目の因子であるcallback functionを実行
> });
> ```

*Parameters:*

* **event\_name** `String` callback functionを bindするイベント名
* **callback\_function** `Function` イベント発生する際に実行されるcallback functionとなります。場合によってcallback functionにはパラメータが付与されることがあります。

*Return:*

* `Object` VG-Controller Client オブジェクトをリターンします.

### off (event\_name)

**対象プレイヤータイプ：v3,v4**

> 登録されたイベントリスナーを削除します。
>
> ```javascript
> controller.off('event_name');
> ```

*Parameters:*

* **event\_name** `String` callback functionて bindされたイベント名

*Return:*

* `Object` VG-Controller Client オブジェクトをリターンします。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://catenoid-support.gitbook.io/kollus-dev-jp/kollus-vg-controller/ibentomesoddo.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
