|
|
|
|
Functions
MioScript Reference
|
|
Syntax
| doEvent.eventName(delay, windowID) |
Parameters
| INT | delay | Delay, in millisecond. MioEngine waits for the specified delay before the code is executed.
| | ID | windowID | Optional. ID of a window to be retrieved with window.eventAuthor from the code of the event. |
Return value
No value is returned.
Description
Requests the execution of a block of code.
eventName is the name of an event declared with event.eventName.
MioEngine maintains an internal list of events to be executed. Event are added in the list and are executed when the delay specified is reached.
If no delay is specified, the event is still added in the list, and will be executed when the older events in the list will be processed.
When the doEvent statement is reached, the execution of the current block of code is not stopped.
See also: event.eventName, event.end, window.eventAuthor
More information: MioScript: Events |
MioScript Sample Code
// Sample 1: Simple call of an event
event.load
...
doEvent.myEvent()
event.end
event.myEvent
...
event.end
// Sample 2: Call of an event using a variable
event.load
...
&myEvent = eventName
doEvent.&myEvent()
event.end
event.myEvent
...
event.end
// Sample 3: Order of execution
event.load
alert("In event.load, step A")
doEvent.doAlert()
alert("In event.load, step B")
event.end
event.doAlert
alert("In event.doAlert")
event.end
// The alerts are prompted in this order:
// -> In event.load, step A
// -> In event.load, step B
// -> In event.doEvent
|
|
|
|