Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
--
global videoChannel, videoDuration
global sliderChannel, sliderLeft, sliderRight
on prepareMovie
-- Initiate global variables
-- Sprite number of the QuickTime video
videoChannel = 1
-- Get the duration of the video
videoDuration = member("QuickTime movie").duration
-- Sprite number of the slider
sliderChannel = 3
-- Left most position of the slider
sliderLeft = 80
-- Right most position of the slider
sliderRight = 230
end prepareMovie
--
--
global videoChannel, videoDuration
global sliderChannel, sliderLeft, sliderRight
property sliderControl
on beginSprite me
sliderControl = 0
sprite(me.spriteNum).locH = sliderLeft
end beginSprite
on enterFrame me
if sliderControl < 1 then
if sprite(videoChannel).movieTime < videoDuration then sprite(videoChannel).movieRate = 1
sprite(me.spriteNum).locH = (sliderRight - sliderLeft) * sprite(videoChannel).movieTime / videoDuration + sliderLeft
else
sprite(videoChannel).movieRate = 0
if the mouseH < sliderLeft then
sprite(me.spriteNum).locH = sliderLeft
else if the mouseH > sliderRight then
sprite(me.spriteNum).locH = sliderRight
else
sprite(me.spriteNum).locH = the mouseH
end if
sprite(videoChannel).movieTime = (sprite(me.spriteNum).locH - sliderLeft) * videoDuration / (sliderRight - sliderLeft)
end if
end enterFrame
on mouseDown me
sliderControl = 1
end mouseDown
on mouseUp me
sliderControl = 0
end mouseUp
on mouseUpOutside me
sliderControl = 0
end mouseUpOutside
--