The ANIMATE object is a Windows GUI control that plays a very basic AVI (Audio-Video Interleaved) file.
It is normally used to indicate system activity during lengthy operations such as copying and searching for files, and prior to the release of Windows Vista it was a core part of the Windows Explorer shell. Since then it has been somewhat deprecated in that role, but the control is still part of Windows and available for use with OpenInsight.
The ANIMATE object supports the following properties
Name | Description |
---|---|
AUTOPLAY | Specifies if the AVI file begins playing as soon as it is opened. |
CENTER | Centers the AVI file in the ANIMATE control |
CLIPNAME | Specifies the name of the AVI file to play. |
REPETITIONS | Specifies the number of times the animation should play. |
STARTFRAME | Specifies the frame number where the animation should start playing from. |
STOPFRAME | Specifies the frame number where the animation should stop playing. |
TRANSPARENT | Indicates that the animation should be displayed using a transparent background. |
The following Common GUI Object properties are not supported:
Specifies if the AVI file beings playing as soon as it is opened.
The AUTOPLAY property is a Boolean value of TRUE$ or FALSE$.
Development | Runtime | Indexed | Scaled | Synthetic |
---|---|---|---|---|
Get/Set | Get/Set | No | No | No |
N/a.
// Example:// //// // Open an AVI file called "FileCopyXP.avi" and begin playing// // immediately// $Insert Logical ObjxArray = @Window : ".ANI_COPYING" PropArray = "AUTOPLAY" DataArray = TRUE$ ObjxArray := @Rm : @Window : ".ANI_COPYING" PropArray := @Rm : "CLIPNAME" DataArray := @Rm : ".\avi\filecopyxp.avi" Call Set_Property_Only( ObjxArray, PropArray, DataArray )
N/a.
Centers the animation in the middle of the control when set, otherwise the animation is displayed in the top-left position.
The CENTER property is a Boolean value of "0" (FALSE$) or "1" (TRUE$).
Development | Runtime | Indexed | Scaled | Synthetic |
---|---|---|---|---|
Get/Set | Get/Set | No | No | No |
N/a.
// Example:// //// // Open an AVI file called "FileCopyXP.avi" and begin playing// // immediately in the centre of the control// $Insert Logical ObjxArray = @Window : ".ANI_COPYING" PropArray = "AUTOPLAY" DataArray = TRUE$
ObjxArray := @Rm : @Window : ".ANI_COPYING" PropArray := @Rm : "CENTER" DataArray := @Rm : TRUE$ ObjxArray := @Rm : @Window : ".ANI_COPYING" PropArray := @Rm : "CLIPNAME" DataArray := @Rm : ".\avi\filecopyxp.avi" Call Set_Property_Only( ObjxArray, PropArray, DataArray )
N/a.
Specifies the name of the AVI file to play.
The CLIPNAME property can be the name of an actual file, or the name of a resource contained in an EXE or DLL. If the latter then it should be specified in the format:
<filename> '#' <resourceID>
Development | Runtime | Indexed | Scaled | Synthetic |
---|---|---|---|---|
Get/Set | Get/Set | No | No | No |
The control can display an AVI file originating from either an uncompressed AVI file or from an AVI file that was compressed using run-length (BI_RLE8) encoding. It must not contain a sound channel.
// Example:// //// // Open an AVI file contained in Shell32.dll with an ID of 43506// // and begin playing immediately in the centre of the control// $Insert Logical ObjxArray = @Window : ".ANI_COPYING" PropArray = "AUTOPLAY" DataArray = TRUE$
ObjxArray := @Rm : @Window : ".ANI_COPYING" PropArray := @Rm : "CENTER" DataArray := @Rm : TRUE$ ObjxArray := @Rm : @Window : ".ANI_COPYING" PropArray := @Rm : "CLIPNAME" DataArray := @Rm : "shell32.dll#43506" Call Set_Property_Only( ObjxArray, PropArray, DataArray )
N/a.
Specifies the number of times to play the animation.
The REPETITIONS property is an integer value that specifies the number of times to play the animation. If set to -1 (the default) then the clip plays indefinitely.
Development | Runtime | Indexed | Scaled | Synthetic |
---|---|---|---|---|
Get/Set | Get/Set | No | No | No |
N/a.
// Example:// //// // Open an AVI file contained in Shell32.dll with an ID of 43506// // and begin playing immediately for a total of 10 times.// $Insert Logical ObjxArray = @Window : ".ANI_COPYING" PropArray = "AUTOPLAY" DataArray = TRUE$
ObjxArray := @Rm : @Window : ".ANI_COPYING" PropArray := @Rm : "REPETITIONS" DataArray := @Rm : 10 ObjxArray := @Rm : @Window : ".ANI_COPYING" PropArray := @Rm : "CLIPNAME" DataArray := @Rm : "shell32.dll#43506" Call Set_Property_Only( ObjxArray, PropArray, DataArray )
N/a.
Specifies the frame number from which to begin playing.
The STARTFRAME property is an integer value that specifies the frame number to start playing from. The value must be less than the STOPFRAME value and less than 65536. It defaults to 1.
Development | Runtime | Indexed | Scaled | Synthetic |
---|---|---|---|---|
Get/Set | Get/Set | No | No | No |
N/a.
// Example:// //// // Open an AVI file called "FileCopyXP.avi" and begin playing// // immediately from frame 4.// $Insert Logical ObjxArray = @Window : ".ANI_COPYING" PropArray = "AUTOPLAY" DataArray = TRUE$
ObjxArray := @Rm : @Window : ".ANI_COPYING" PropArray := @Rm : "STARTFRAME" DataArray := @Rm : 4 ObjxArray := @Rm : @Window : ".ANI_COPYING" PropArray := @Rm : "CLIPNAME" DataArray := @Rm : ".\avi\filecopyxp.avi" Call Set_Property_Only( ObjxArray, PropArray, DataArray )
N/a.
Specifies the last frame number to display when playing a clip.
The STOPFRAME property is an integer value that specifies the frame number to stop playing at. The value must be -1 (the default) to specify the last frame in the clip, or be greater than the STARTFRAME value and less than 65536.
Development | Runtime | Indexed | Scaled | Synthetic |
---|---|---|---|---|
Get/Set | Get/Set | No | No | No |
N/a.
// Example:// //// // Open an AVI file called "FileCopyXP.avi" and begin playing// // immediately from frames 4 to 8// $Insert Logical ObjxArray = @Window : ".ANI_COPYING" PropArray = "AUTOPLAY" DataArray = TRUE$
ObjxArray := @Rm : @Window : ".ANI_COPYING" PropArray := @Rm : "STARTFRAME" DataArray := @Rm : 4 ObjxArray := @Rm : @Window : ".ANI_COPYING" PropArray := @Rm : "STOPFRAME" DataArray := @Rm : 8 ObjxArray := @Rm : @Window : ".ANI_COPYING" PropArray := @Rm : "CLIPNAME" DataArray := @Rm : ".\avi\filecopyxp.avi" Call Set_Property_Only( ObjxArray, PropArray, DataArray )
N/a.
Indicates that the animation should be displayed using a transparent background.
The TRANSPARENT property is a Boolean value of "0" (FALSE$) or "1" (TRUE$). When set to TRUE$ the top-left pixel in the animation frame is assumed to be the AVI file background color – any pixels matching this color are instead painted the same color as the control's BACKCOLOR property.
Development | Runtime | Indexed | Scaled | Synthetic |
---|---|---|---|---|
Get/Set | Get/Set | No | No | No |
This control is sensitive to the order in which properties are set. To ensure that the transparency is implemented properly set the BACKCOLOR and the TRANSPARENT property before you set the CLIPNAME property.
// Example:// //// // Open an AVI file called "FileCopyXP.avi" and begin playing// // immediately with a transparent background// $Insert Logical ObjxArray = @Window : ".ANI_COPYING" PropArray = "AUTOPLAY" DataArray = TRUE$
ObjxArray := @Rm : @Window : ".ANI_COPYING" PropArray := @Rm : "BACKCOLOR" DataArray := @Rm : -1 ; // transparent// ObjxArray := @Rm : @Window : ".ANI_COPYING" PropArray := @Rm : "TRANSPARENT" DataArray := @Rm : TRUE$ ObjxArray := @Rm : @Window : ".ANI_COPYING" PropArray := @Rm : "CLIPNAME" DataArray := @Rm : ".\avi\filecopyxp.avi" Call Set_Property_Only( ObjxArray, PropArray, DataArray )
N/a.
The ANIMATE object supports the following methods:
Name | Description |
---|---|
PLAY | Begins playing the animation file. |
STOP | Stops playing the animation file. |
Begins the playback of an animation file.
bSuccess = Exec_Method( CtrlEntID, |
"PLAY", |
Repetitions, |
StartFrame, |
StopFrame )
Name | Required | Description |
---|---|---|
Repetitons | No | Specifies the number of times to play the animation. Defaults to -1. See the REPETITIONS property above. |
StartFrame | No | Specifies the frame number from which to begin playing. Defaults to 1. See the STARTFRAME property above. |
StopFrame | Yes | Specifies the last frame number to display when playing a clip. Defaults to -1. See the STOPFRAME property above. |
"1" (TRUE$) if the clip was started successfully, "0" (FALSE$) otherwise.
N/a.
// Example:// //// // Open an AVI file called "FileCopyXP.avi" and begin playing// // from frames 4 to 8, with 10 repetitions// $Insert Logical Call Set_Property_Only( @Window : ".ANI_COPYING", | "CLIPNAME", | ".\avi\filecopyxp.avi" )
Call Exec_Method( @Window : ".ANI_COPYING", "PLAY", 10, 4, 8 )
N/a.
Stops the playback of an animation file.
bSuccess = Exec_Method( CtrlEntID, "STOP" )
N/a.
"1" (TRUE$) if the clip was stopped successfully, "0" (FALSE$) otherwise.
N/a.
// Example:// //// // Open an AVI file called "FileCopyXP.avi" and begin playing// // immediately, stopping after some process has finished// $Insert Logical Call Set_Property_Only( @Window : ".ANI_COPYING", | "CLIPNAME", | ".\avi\filecopyxp.avi" )
Call Exec_Method( @Window : ".ANI_COPYING", "PLAY" ) // Do long running data process ....// Call Exec_Method( @Window : ".ANI_COPYING", "STOP" )
N/a.