return "Drag to slider 'handle' to enable control of video play time. Requires additional 'extent' member which limits the handle travel range." & RETURN & "PARAMETERS:" & RETURN & "ΓÇó Video Sprite - Enter the number of sprite channel in which video is displayed." & RETURN & "ΓÇó Extent Sprite - Enter the number of sprite channel that contains the 'extent' sprite." & RETURN & "ΓÇó Hilite Member - Member to display while handle is being dragged." & RETURN & "ΓÇó Dynamic - If set, video time will be updated while handle is dragged, else when handle is released."
end
on compute_val me
val = 0.0
val = float(me.currentScreenVal) / float(me.extentlength)
val = val * me.valrange
val = val + me.min
return val
end
on send_the_val me, val
pMovieTime = val * pDuration
videoseek(sprite(videoSprite), pMovieTime)
end
on beginSprite me
pDuration = sprite(videoSprite).duration
me.min = 0.0
me.max = 1.0
handle = me.spriteNum
me.tracking = 0
me.newLocH = the locH of sprite handle
me.newLocV = the locV of sprite handle
me.newLocV = the locV of sprite me.extentSprite
me.minScreen = the left of sprite me.extentSprite
me.maxScreen = the right of sprite me.extentSprite
set the locH of sprite handle to me.newLocH
set the locV of sprite handle to me.newLocV
me.valrange = me.max - me.min
me.extentlength = me.maxScreen - me.minScreen
end
on prepareFrame me
if tracking then
handle = me.spriteNum
extent = me.extentSprite
me.newLocH = the mouseH
me.newLocV = the locV of sprite extent
if me.newLocH < the left of sprite extent then
me.newLocH = the left of sprite extent
end if
if me.newLocH > the right of sprite extent then
me.newLocH = the right of sprite extent
end if
me.currentScreenVal = me.newLocH - me.minScreen
set the locH of sprite handle to me.newLocH
set the locV of sprite handle to me.newLocV
if me.dynamic then
send_the_val(me, compute_val(me))
end if
else
if float(pDuration) = 0 then
pDuration = sprite(videoSprite).duration
end if
if float(pDuration) <> 0 then
x = float(sprite(videoSprite).currentTime) / float(pDuration)
end if
handle = me.spriteNum
extent = me.extentSprite
ScreenX = the left of sprite extent + (x * (the right of sprite extent - the left of sprite extent))
me.newLocH = ScreenX
me.newLocV = the locV of sprite extent
if me.newLocH < the left of sprite extent then
me.newLocH = the left of sprite extent
end if
if me.newLocH > the right of sprite extent then
me.newLocH = the right of sprite extent
end if
me.currentScreenVal = me.newLocH - me.minScreen
set the locH of sprite handle to me.newLocH
set the locV of sprite handle to me.newLocV
end if
end
on mouseDown me
tracking = 1
temp = the member of sprite me.spriteNum
set the member of sprite the spriteNum of me to member(me.hiliteMember)
me.hiliteMember = temp
end
on mouseUp me
global volgen, channel, svolgen
tracking = 0
temp = the member of sprite me.spriteNum
set the member of sprite the spriteNum of me to member(me.hiliteMember)
me.hiliteMember = temp
if sprite(videoSprite).mediaBusy <> "Media not loaded" then