Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Comment:
Migrated to Confluence 5.3
Excerpt |
---|
Allows you to cancel all queued and timed calls associated with a specific function... |
Syntax
Note | ||
---|---|---|
| ||
The queue() function uses the timer functionality behind the scenes, so when you use removeTimer() it will remove both timers and queued calls for the specified function. |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
removeTimer(functionName); |
Parameters
Parameter | Mandatory | Type | Description | Game version |
---|---|---|---|---|
functionName | String | All timers (including queued function calls) associated with the named function (referenced by it's name in quotes) will be cancelled. | 3.1 Beta 1 |
Return value
Value | Type | Description | Game version |
---|---|---|---|
undefined | Undefined | The timers/queues associated with the function have been removed. | 3.1 Beta 1 |
<error> | Error | Did you forget to specify functionName as a string? | 3.1 Beta 1 |
Example
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
function foo() {
// do stuff
}
setTimer("foo", 1000);
queue("foo", 2000);
removeTimer("foo"); // cancel both the timer and the queue |
Div | ||||||
---|---|---|---|---|---|---|
| ||||||
Availability
Requires:
|
Div | ||||
---|---|---|---|---|
| ||||
ContentsJump to:
|
Div | ||
---|---|---|
| ||
See alsoRelated articles: |