home *** CD-ROM | disk | FTP | other *** search
- --VIDEO CONTROLS
-
- on initVid
- -- 35 = OPTIONAL - still of first video frame
- -- 36 = controller bar
- -- 37 = play/pause toggle
- -- NOTE: the regPoint of the play/pause cast members is centered!
- -- 38 = video on/off toggle
- -- 39 = line cast member position and width of video controls
- -- 40 = video
-
- repeat with i = 36 to 38
- set the visible of sprite i to 1
- puppetSprite i, 1
- end repeat
-
- set x = the left of sprite 39
- set w = the width of sprite 39
- set z = the bottom of sprite 39
-
- set n = 0
- if the paramCount >= 1 then set n = param(1)
- if the paramCount = 2 then set x = x + param(2)
-
- set the locH of sprite 37 to (x + 18)
- set the locV of sprite 37 to (z + n + 18)
-
- set the locH of sprite 38 to (x + w - 35)
- set the locV of sprite 38 to (z + n)
-
- set the width of sprite 36 to (w - 75)
- set the locH of sprite 36 to x + 18
- set the locV of sprite 36 to z + n + 14
- end
-
- --**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--
-
- on moveThumbNail
- global VID
-
- set y = the left of sprite 36
- set w = the width of sprite 36
- set the locH of sprite 37 to ¬
- y + (1.00 * w / VID) * the movieTime of sprite 40
- end moveThumbNail
-
- --**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--
-
- on controlVideo sp, h, flag
- global VID
-
- -- sp : the clickOn
- -- h : the mouseH
- -- flag : play button -> 1
- -- pause button -> 0
-
- set pos = the locH of sprite sp
- set a = (the left of sprite 36) * 1.00
- set w = the width of sprite 36
-
- set offx = h - pos -- offset from regPoint
-
- if the stillDown then
- set the movieRate of sprite 40 to 0
- repeat while the stillDown
- set x = constrainH(36,the mouseH - offx)
- set the locH of sprite sp to x
- set t = integer((x - a) / w * VID)
- set the movieTime of sprite 40 to min(t, VID - 1)
- updateStage
- end repeat
- end if
-
- if the locH of sprite sp = pos then
- set the movieRate of sprite 40 to not(flag)
- set the memberNum of sprite sp to (49 + flag)
- else
- set the movieRate of sprite 40 to flag
- end if
- updateStage
- end controlVideo
-
- --**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--
-
- on flashVideo
- global k, ROLLNUMBER
-
- set sp = 38
- set myCast = 27
- -- set myCast = the number of member "VID21" of cast "Shared.Cst"
- if rollover(sp) then
- --VIDEO OFF
- set ROLLNUMBER = 9
- set the memberNum of sprite sp to (myCast + k)
- else
- set the memberNum of sprite sp to myCast
- end if
- end flashVideo
-
- --**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--
-
- on disposeVid
- repeat with i = 35 to 40
- puppetSprite i, 0
- set the visible of sprite i to 0
- end repeat
- repeat with i = 35 to 40
- set the visible of sprite i to 1
- end repeat
- end disposeVid
-