PlayRate Property

Sprite Control

Sets or retrieves the sprite's playback speed. Can be used to speed up or slow down sprite playback, or even play the sprite backward. Read-write at run time; write access is available at run time only when the sprite is stopped.

Syntax

HTML<PARAM NAME="PlayRate" VALUE="rSpeed">
ScriptingspriteObj.PlayRate=rSpeed

Possible Values

rSpeed
Floating-point expression indicating the number used to multiply the duration for each frame. The default value is 1.0. Possible values are:
Positive (>0.0) Sprite plays forward.
0.0 Disables the PlayRate property.
Negative (<0.0) Sprite plays backward.

Remarks

If the sprite does not have a frame map, the timer interval is divided by the value of PlayRate to determine the duration for all frames. PlayRate values greater than 1.0 speed up playback; values smaller than 1.0 slow down playback.

Example

The following example sets the play rate for the sprite named SpriteHorse to the value the user enters on the page.

SUB PlayRate_onclick
SpriteHorse.PlayRate=document.MyForm.txtPlayRate.value

Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.