This is a basic command. A frame animation consists of images only. Different from other types of animations, a frame animation does not have interpolation. You can set an interval between the display of two images.
<SourcesAnimation delay="" repeat="">
<Source src="" time=""/>
</SourcesAnimation> Parameter | Type | Mandatory | Description |
|---|---|---|---|
delay | Number | No | Delay for executing a command, in milliseconds. The animation is played after the specified delay. |
repeat | Number | No | Number of times that an animation is played. If the value is 0, the animation is played for infinite times. |
src | String | Yes | Name of an image file. This parameter cannot be left empty. |
time | Number | Yes | Number of milliseconds from the start frame, which is also the duration of an animation. The minimum image delay that can be identified by human eyes is about 300 ms. Therefore, the value of this parameter is no less than 0 and is recommended to be smaller than 300. |
Create a frame animation with different images in each frame. For example, the image zuida1_1.png is displayed from the 400th to 800th millisecond, and changed to zuida1_2.png at the 800th millisecond.
<Image x="-50" y="490" centerX="139" centerY="151" src="zuida1_1.png">
<SourcesAnimation>
<Source src="zuida1_1.png" time="0"/>
<Source src="zuida1_1.png" time="400"/>
<Source src="zuida1_2.png" time="800"/>
<Source src="zuida1_3.png" time="1200"/>
<Source src="zuida1_4.png" time="1600"/>
<Source src="zuida1_5.png" time="2000"/>
<Source src="zuida1_1.png" time="2500"/>
<Source src="zuida1_1.png" time="3000"/>
<Source src="zuida1_2.png" time="3500"/>
<Source src="zuida1_3.png" time="4000"/>
<Source src="zuida1_4.png" time="4500"/>
<Source src="zuida1_5.png" time="5000"/>
</SourcesAnimation>
</Image>