home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 July / Chip_1998-07_cd.bin / zkuste / mazda / mazIn311.dxr / Internal_2_Go to Marker.ls < prev    next >
Encoding:
Text File  |  1998-05-06  |  1.8 KB  |  59 lines

  1. property whichevent, WhichLabel, playMode
  2.  
  3. on initGotoMarker me
  4.   init(me)
  5. end
  6.  
  7. on mouseUp me
  8.   if whichevent = #mouseUp then
  9.     init(me)
  10.   end if
  11. end
  12.  
  13. on prepareFrame me
  14.   if whichevent = #prepareFrame then
  15.     init(me)
  16.   end if
  17. end
  18.  
  19. on exitFrame me
  20.   if whichevent = #exitFrame then
  21.     init(me)
  22.   end if
  23. end
  24.  
  25. on init me
  26.   if the playMode of me = "Go to" then
  27.     case WhichLabel of
  28.       #previous:
  29.         go(marker(-1))
  30.       #loop:
  31.         go(marker(0))
  32.       #next:
  33.         go(marker(1))
  34.       otherwise:
  35.         go(WhichLabel)
  36.     end case
  37.   else
  38.     case WhichLabel of
  39.       #previous:
  40.         play frame marker(-1)
  41.       #loop:
  42.         play frame marker(0)
  43.       #next:
  44.         play frame marker(1)
  45.       otherwise:
  46.         play frame WhichLabel
  47.     end case
  48.   end if
  49. end
  50.  
  51. on getPropertyDescriptionList
  52.   set p_list to [#WhichLabel: [#comment: "Destination Marker:", #format: #marker, #default: "#Loop"], #whichevent: [#comment: "Initializing Event:", #format: #symbol, #range: [#mouseUp, #prepareFrame, #exitFrame, #initGotoMarker], #default: #mouseUp], #playMode: [#comment: "Play Mode:", #format: #symbol, #range: ["Go to", "Play and Return"], #default: "Go to"]]
  53.   return p_list
  54. end
  55.  
  56. on getBehaviorDescription
  57.   return "Moves the Playback Head to a designated marker when the specified event occurs.  Drag to a sprite or a frame in the script channel." && RETURN & "PARAMETERS:" && RETURN & "ΓÇó Destination Marker - Choose from a list of all marker names in the current movie or choose Previous, Loop (Current), or Next." && RETURN & "ΓÇó Initializing Event - Specify the event that triggers the behavior." & RETURN & "ΓÇó Play Mode - Choose Play and Return to make the Playback Head return to the current location when the Play Done behavior is encountered. Choose Go To to make the Playback Head continue from the specified frame until explicitly sent to a new location."
  58. end
  59.