This property is important for the content that is updated per time. For example, for image sequences, this property indicates how fast images will be switched.
Rate is nested in separated XML node <rate>:
<cg-item id='image-000'> <img path=c:\folderWithImages\*.*'/> <cg-props pos-x='36' pos-y='24' show='yes' move-type='accel-both' alpha='255' bg-color='Black(0)' pixel-ar='0.' play-mode='loop' interlace='auto' scale='fit-ar' align='top-left' width='300' height='200' pause='no' edges-smooth='0'> <indent left='0' right='0' top='0' bottom='0' use-for-bg='no'/> <group-indent left='0' right='0' top='0' bottom='0'/> </cg-props> <rate original='yes' speed='1.'/> </cg-item>
Rate node contains 2 attributes: original and speed.
To keep original playback rate (for example for a flash movie) you should set the original attribute to 'yes'. If it is 'no' - the item is updated according to source object playback rate.
To modify the speed of item refreshing you should set speed attribute. For example, to decrease frequency for image sequence you can set speed='0.1' - in this case, the image is updated on each 10 frame of the source object. By default playback rate is 1. It means that new frame from CG item should be received within each frame from the source object.
You can specify item rate from source code with the SetItemRate method. This method contains the following parameters:
- _bsItemID - identifier of item for which rate is set
- _bOriginalRate - indicates whether original rate is used ('1') or not ('0'). This parameter manipulates original attribute.
- _dblSpeed - item rate. This parameter manipulates speed attribute.
string myItemID = "myImageSequence"; int useOriginalRate = 1; double itemRate = 0.1; myCharGen.SetItemRate(myItemID, useOriginalRate, itemRate);