Livecode Wiki
Advertisement

A Message sent to a player when the user switches to another frame. If there is a message handler by the same name in the message path, then it will be executed.

Message[]

Syntax:

currentTimeChanged <newTime>

The parameter <newTime> is the number of the interval where the player is after the change.

The newTime parameter was introduced in version 2.0. In previous versions, the currentTimeChanged message did not have a parameter.

The user can change the current time by clicking in the controller bar or by using the arrow keys when the player is the active (focused) control.

The number of intervals per second is specified by the player's timeScale property. The total number of intervals is given in the player's duration property.

Message handler[]

Examples:

on currentTimeChanged theInterval -- display the time in a field
  put theInterval into field "Time Code"
end currentTimeChanged

Use the currentTimeChanged Message handler to do something when the user changes the current time in a player.

The actual process of changing the player's current time is not triggered by the currentTimeChanged message, so trapping the message and not allowing it to pass does not prevent the user from changing the player's current time manually.

See also: playStarted, playPaused, selectionChanged, player, callbacks & duration,

Advertisement