Sets an event handler that runs when the timeline completes playing.
The event handler set by calling the onComplete()
function runs when a
timeline completes playing by reaching the end.
When a timeline has been set to repeat, the event handler runs at the end of the last repetition and does not run for the preceding repetitions.
If an event handler is already set for onComplete
, setting a new event
handler overrides the one set previously.
To remove an event handler you set previously, call the onComplete()
function and pass null
for the handler
parameter.
The name of the function or the function expression to run when the timeline completes playing.