主题:  AVI的快速倒退键和快速前进键

linda928

职务:普通成员
等级:1
金币:0.0
发贴:54
注册:2001/5/11 8:55:37
#12001/7/29 13:50:08
需要自己做AVI的快速倒退键和快速前进键,请问如何用lingo控制。谢谢!

编辑历史:[这消息被linda928编辑过(编辑时间2001-07-31 09:34:12)]
[这消息被linda928编辑过(编辑时间2001-07-31 09:43:49)]


云山

职务:普通成员
等级:1
金币:0.0
发贴:24
注册:2001/7/29 12:33:43
#22001/7/29 14:28:24
看看一下方法:
1、使用DMX插件:
单击“INSERT”——“TABULEIRO”——“DIRECT MEDIAXTRA”
单击“BROESE FILE”选择AVI文件
选种“TOOLBAR”复选框
2、LINGO语法:
sprite(通道).movieRate控制电影的播放速度.movieRate=0暂停播放.movieRate=-1倒放.movieRate=1恢复正常.

暂停电影的按钮代码.

on mouseUp me
 sprite(1).movieRate=0
end

继续代码
on mouseUp me
 sprite(1).movieRate=1
end

倒放

on mouseUp me
 sprite(1).movieRate=-1
end

播放速度格式:Sprite(通道号).movieTime 时间的基本单位是ticks也就是1/60秒.

例如:sprite(1).movieTime=5*60(5秒)



linda928

职务:普通成员
等级:1
金币:0.0
发贴:54
注册:2001/5/11 8:55:37
#32001/7/29 14:37:29
已经解决,不过楼上的老兄可能理解错我的问题了。倒退的源程序下:

global currentmoviesprite,barsprite,barlength,min_h,max_h,moviemaxtime
set temp=sprite(currentmoviesprite).movietime
if temp<100 then
sprite(currentmoviesprite).movietime=0
else
sprite(currentmoviesprite).movietime=sprite(currentmoviesprite).movietime-500
end if
下面是控制滑动条的
set timenow=sprite(currentmoviesprite).movietime
set postemp=min_h+(timenow*barlength)/moviemaxtime
set the loch of sprite barsprite to postemp

updatestage

编辑历史:[这消息被linda928编辑过(编辑时间2001-07-29 14:51:07)]