AVI电影放在通道1,滑块放在通道2,滚动条放在通道3。
在第10贞加了:
on exitFrame me
go the frame
sprite(3).loch=sprite(2).loch+sprite(2).width*(sprite(1).movietime*1.0/(sprite(1).duration*1.0))
end
在滑块上加了:
on mouseDown me
repeat while the mouseDown
sprite(me.spritenum).loc=the mouseloc
updatestage
end repeat
set the constraint of sprite 1 to 2
end mouseDown
这样,滚动条能随着电影播放而动,滑块也可以拖动,但是我一放开鼠标,那滑块就到了开头。
我在10贞那加了:
sprite(1).movietime=((sprite(3).loch-sprite(2).loch)/sprite(2).width)*sprite(1).duration
后电影不能播放了。
请问我错在哪里?
想实现跟一般播放器一样,对电影的自由控制:滚动条滑块能随着电影的播放而滑动,鼠标可以拖动滚动滑块,当滑快被拖动后,电影能够跳到相应的画面并且开始播放。
要怎么做?
相关文件(rar):
点这儿打开