The code declared for an event is interpreted when the event occurs, or when the statement doEvent.eventName is called.
When an event occurs, MioEngine tries to find a declaration for the event in your code.
You can also create events for your own use, for example to run a code at interval or after a delay.
To declare an event:
event.myEventName
...
event.end
An event can be raised with the function doEvent.
The code is not executed immediately but when MioEngine have completed the code currently running.
This is useful to create loops while the application still reacts to the user interaction.