#62001/7/24 14:56:27
我直接从我程序中复制出来,改改就能用了。(其中sprite 10是图片,sprite 14是 滚动条 图片的坐标从 460---370 滚动条的坐标从 530--286)
这是放在向上键头上的。
on mouseUp
if sprite(10).locv<460 then
sprite(10).locv=sprite(10).locv+20
if sprite(14).locv>370 then
sprite(14).locv=sprite(14).locv-20/(90.0/244)
else
sprite(14).locv=286
end if
updatestage
end if
end
向下键头:
on mouseUp
if sprite(10).locv>370 then
sprite(10).locv=sprite(10).locv-20
if sprite(14).locv<502 then
sprite(14).locv=sprite(14).locv+20/(90.0/244)
else
sprite(14).locv=530
end if
updatestage
end
滚动条上的
on mousedown me
repeat while the mousedown
sprite(14).locv=the mousev
if sprite(14).locv<286 then
sprite(14).locv=286
else if sprite(14).locv>502 then
sprite(14).locv=530
end if
sprite(10).locv=565.5-0.3689*sprite(14).locv
updatestage
end repeat
end
bar上的:
on mouseUp
if sprite(14).locv>the mousev then
sprite(14).locv=286
sprite(10).locv=460
else
sprite(14).locv=530
sprite(10).locv=370
end if
end
这个sprite(10).locv=565.5-0.3689*sprite(14).locv中565.5和0/3689是按两个坐标求出的。
没明白找我吧,qq:6250631