frame script中含有以下代码,以实现‘‘定格‘‘: on exitframe me go the frame end 再把以下behavior拖到filmloop sprite即可: on exitframe me --但用prepareframe不行?! tell sprite(me.spriteNum) if the frame = the lastframe then ploopcnt = 1 end if end tell if ploopcnt then go next --或改为其它命令 end if end
5、对filmloop的控制。
以下behavior的功能是用于一个filmloop sprite,点击暂停,再次点击则继续。 property ppause,pframe on beginsprite me ppause=false pframe=1 end
on mouseup me ppause=not ppause if ppause then tell sprite(me.spriteNum) to pframe=the frame end if end
on exitframe me if ppause then if pframe=1 then tell sprite(me.spriteNum) to go to the lastframe else tell sprite(me.spriteNum) to go to pframe-1 end if end if end 由此我们也可以知道,我们无法使filmloop的播放速度快于movie,但可以用上法的变通来减慢它。 补充说明:tell sprite...用法类似tell window,但尚未见于正式文档,我使用至今,尚未见其出错。