home *** CD-ROM | disk | FTP | other *** search
/ Krolewskie bramki Polakow Mundiale 1938 to 1986 / MUNDIAL2002.iso / start.exe / start.dxr / 00101_Control.ls < prev    next >
Encoding:
Text File  |  2002-05-20  |  3.4 KB  |  63 lines

  1. property videoSprite, videoCommand, standardImage, alternateImage, clickedImage, param1, param2
  2.  
  3. on DoControl me
  4.   case me.videoCommand of
  5.     #play:
  6.       videoplay(sprite(me.videoSprite))
  7.     #pause:
  8.       videopause(sprite(me.videoSprite))
  9.     #rewind:
  10.       videoseek(sprite(me.videoSprite), sprite(me.videoSprite).segmentstart)
  11.     #StepForward:
  12.       videopause(sprite(me.videoSprite))
  13.       videoseek(sprite(me.videoSprite), sprite(me.videoSprite).currentTime + 30)
  14.     #StepBackward:
  15.       videopause(sprite(me.videoSprite))
  16.       videoseek(sprite(me.videoSprite), sprite(me.videoSprite).currentTime - 30)
  17.     #Seek:
  18.       videoseek(sprite(me.videoSprite), me.param1)
  19.     #playsegment:
  20.       videoplaysegment(sprite(me.videoSprite), me.param1, me.param2)
  21.   end case
  22. end
  23.  
  24. on mouseUp me
  25.   cursor(-1)
  26.   set the member of sprite the spriteNum of me to me.standardImage
  27.   DoControl(me)
  28. end
  29.  
  30. on mouseDown me
  31.   set the member of sprite the spriteNum of me to me.clickedImage
  32. end
  33.  
  34. on mouseEnter me
  35.   cursor(280)
  36.   set the member of sprite the spriteNum of me to me.alternateImage
  37. end
  38.  
  39. on mouseLeave me
  40.   cursor(-1)
  41.   set the member of sprite the spriteNum of me to me.standardImage
  42. end
  43.  
  44. on beginSprite me
  45.   me.standardImage = the member of sprite me.spriteNum
  46. end
  47.  
  48. on getPropertyDescriptionList
  49.   if the currentSpriteNum = 0 then
  50.     memdefault = 0
  51.   else
  52.     memref = the member of sprite the currentSpriteNum
  53.     memdefault = member(member(memref).memberNum + 1)
  54.     memdefault2 = member(member(memref).memberNum + 2)
  55.   end if
  56.   p_list = [#videoCommand: [#comment: "Action:", #format: #symbol, #range: [#play, #pause, #rewind, #StepBackward, #StepForward, #Seek, #playsegment], #default: #play], #param1: [#comment: "First Parameter (Use with seek or playsegment):", #format: #long, #default: 0], #param2: [#comment: "Second Parameter (Use with playsegment):", #format: #long, #default: 0], #videoSprite: [#comment: "DirectMedia Sprite Channel:", #format: #integer, #default: 1], #alternateImage: [#comment: "Rollover Button Cast Member:", #format: #graphic, #default: memdefault], #clickedImage: [#comment: "Clicked Button Cast Member:", #format: #graphic, #default: memdefault2]]
  57.   return p_list
  58. end
  59.  
  60. on getBehaviorDescription
  61.   return "Used to create Play, Pause, StepForward, StepBackward, Rewind, Seek and PlaySegment control buttons for a DirectMedia Xtra video sprite. You can also attach rollover and alternate images for the clicked buttons" & RETURN & "PARAMETERS:" & RETURN & "Action - Choose the action to perform on mouseUP ( Play, Pause, Rewind, StepBackward, StepForward, Seek, PlaySegment )." & RETURN & "First Parameter: if the Action is Seek than this parameter contains the seek to time (in milliseconds). For the PlaySegment action this parameter contains the starting time of the segment to play (in milliseconds)" & RETURN & "Second Parameter: Used with the PlaySegment action. Contains the ending time of the segment to play (in milliseconds)" & RETURN & "DirectMedia Sprite Channel - Enter the number of sprite channel of the DirectMedia Xtra video that is being controlled." & RETURN & "Rollover Button: the castmember that will be used as the rollover image of the button. Default is the castmember located just after the button castmember" & RETURN & "Clicked Button: the castmember that will be used as the clicked image of the button. Default is the castmember located just after the rollover castmember"
  62. end
  63.