Animated GIF Xtra函数详解!

◆ 属性:#directToStage
函数:SetIconProperty(IconID@"Icontitle", #directToStage, state)
GetIconProperty(IconID@"Icontitle", #directToStage )
说明:设置、取得GIF动画是否显示在最高层次(即最优显示)。参数state为TRUE时,GIF动画为最优显示。例如:
SetIconProperty(IconID@"angel", #directToStage, TRUE)
◆ 属性:#fixedRate
函数:SetIconProperty(IconID@"Icontitle", #fixedRate, rate)
GetIconProperty(IconID@"Icontitle", #fixedRate)
说明:设置、取得GIF动画的播放速度,单位为帧/秒。使用函数设置速度时,播放模式属性(#playbackmode)必须设为#fixed,例如:
SetIconProperty(IconID@"angel", #playbackMode, #fixed)
SetIconProperty(IconID@"angel", #fixedRate, 20)
◆ 属性:#linked
函数:SetIconProperty(IconID@"Icontitle", #linked, state)
GetIconProperty(IconID@"Icontitle", #linked)
说明:设置、取得插入GIF动画文件时是否将GIF文件作为外部链接。参数state设为TRUE时将GIF文件作为外部链接。例如:
result := GetIconProperty(IconID@"angel", #linked)
SetIconProperty(IconID@"angel", #linked, ~result)
◆ 属性:#internalpathname
函数:SetIconProperty(IconID@"Icontitle", #internalpathname, file)
GetIconProperty(IconID@"Icontitle", #internalpathname)
说明:设置、取得播放的GIF动画文件的路径。例如:
SetIconProperty(IconID@"angel", #internalpathname,
FileLocation^"angel.GIF")
SetIconProperty(IconID@"angel", #internalpathname,
“http://www.anyserver.com/path/angel.GIF")
Path := GetIconProperty(IconID@"angel", #internalpathname)
◆ 方法:#pause
函数:CallSprite(IconID@"Icontitle", #pause)
说明:暂停播放当前GIF动画。
◆ 属性:#playbackmode
函数:SetIconProperty(IconID@"Icontitle", #playbackmode, mode)
GetIconProperty(IconID@"Icontitle", #playbackmode)
说明:设置、取得GIF动画的播放模式。参数mode为#normal时,以正常速度播放GIF动画;为#fixed时,以设定的速度播放GIF动画;为#lockstep时,锁定GIF动画的播放速度。例如:
SetIconProperty(IconID@"angel", #playbackMode, #fixed)
rate := GetIconProperty(IconID@"angel", #fixedRate)
SetIconProperty(IconID@"angel", #fixedRate, rate+5)
SetIconProperty(IconID@"Icontitle", #playbackmode, #lockstep)
◆ 方法:#resume
函数:CallSprite(IconID@"Icontitle", #resume)
说明:继续播放暂停后的GIF动画。
◆ 方法:#rewind
函数:CallSprite(IconID@"Icontitle", #rewind)
说明:将GIF动画重新定位到第一帧。

整理自“宇风多媒体论坛” ,作者“寒冰”