Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Play - method of object PmiWAnimate

Description:
Play the media file according to set parameters.
Syntax:
Play([sParams As String])
Calling:
oAnimate.Play
Parameters:
sParams[optional] (String) List of string parameters that specify the playing type. Entries with assigned value are separated by a semicolon, for example "from:0;to:-1;sound:yes;".
"from:xxx;" (optional) - Specify, from which position (number of the shot) the animation is played.
0 (default) - The first shot of the played animation sequence
-1 - The last shot of the played animation sequence. It has sense if reverse:yes is set, namely it is played from the last shot backwards.
1,2,3.. - Numeric value is set to specify the shot number.
"to:xxx;" (optional) - Specify, to which position (number of the shot) the animation is played.
0 - The first shot of the played animation sequence. It has sense if reverse:yes is set, namely it is played from a shot backwards to the beginning.
-1 (default) - The last shot of the played animation sequence.
1,2,3.. - Numeric value is set to specify the shot number.
"loop:xxx;" (optional) - Specify if the file is replayed over and over.
-1 (default) - the file is replayed over and over infinitely.
1,2,3.. - Numeric value is set to specify the number of replays. Options 2,3,.. are supported only when the Playing type configurator is set to Simple.
"reverse:xxx;" (optional) - Specify if the file is played backwards, namely from the end to the beginning.
yes - The file is played backwards, namely from the end to the beginning. The first and the last shot is specified by the parameters from,to.

The option is supported only when the Playing type configurator is set to Multimedia.

For some file types (encoded) the option needn't be functional.

no (default) - The file is played from the beginning to the end. The first and the last shot is specified by the parameters from,to.
"sound:xxx;" (optional) - Specify whether the file is played with the sound if it contains the audio track.
yes (default) - The file is played with the sound.

The option is supported only when the Playing type configurator is set to Multimedia.

no - The file is played without the sound.
Note:
The method can also be called in the graphic item events for Web Panels. The additional specification by the sParams parameter is not functional for the web.
See also:
Example1:
The following example either starts unlimited playing of the animation or stops the played animation.
Dim bPlay, oAnimate
...
If bPlay Then
  oAnimate.Play
Else
  oAnimate.Stop
End If
Example2:
The example starts playing the animation from 10-th to 30-th shot with the sound. The file is played only once. (the sound is played only when the Playing type configurator is set to Multimedia).
  oAnimate.Play "from:9;to:29;loop:1;"
Example3:
The example starts playing the animation from 10-th shot to the end without the sound. The file is played 5-times (the Playing type configurator has to be set to Simple).
  oAnimate.Play "from:9;to:-1;loop:5;sound:no;"
Example4:
The example runs the animation playback backwards from the end to 10th frame. The playback is looped.
  oAnimate.Play "from:-1;to:9;loop:-1;reverse:yes;"
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice