setTimeout(func,waitTime) , method of utils

Calls a function after waitTime milliseconds.

Parameters:
name type description
func function zero-argument Javascript function
waitTime int in milliseconds, if zero then immediately run the function
// schedule the movement of a sprite after 1 second.
function moveBall() {
UB.scene.moveSprite(0,ball,100,200);
}
UB.utils.setTimeout(moveBall,1000);

See all methods of the api.