home *** CD-ROM | disk | FTP | other *** search
/ Webster's Millennium Amer…Sign Language Dictionary / ASL.ISO / mac / SHARED.cst / 00032_Script_32 < prev    next >
Text File  |  2001-09-17  |  9KB  |  350 lines

  1. --∂ï
  2. on goMain
  3.   global myLoadWindow,gWhere
  4.   
  5.   cursor 4
  6.   
  7.   if the movie = "Dict.dir" then
  8.     set i = 6
  9.     repeat while i < 43
  10.       set the visible of sprite i = false
  11.       puppetSprite i, 1
  12.       set the loc of sprite i to point(900,900)
  13.       puppetSprite i,0
  14.       set the visible of sprite i = true
  15.       set i = i + 1
  16.     end repeat
  17.   end if
  18.   
  19.   set gWhere = "Main.dir"
  20.   
  21.   if the movieName = "Tour.dir" then 
  22.     jumptour
  23.   else
  24.     jump
  25.   end if
  26.   
  27.   cursor -1
  28.   
  29. end 
  30.  
  31. on goDictionary
  32.   global myLoadWindow,gWhere
  33.   cursor 4
  34.   set gWhere = "Dict.dir"
  35.   if the movieName = "Tour.dir" then 
  36.     jumptour
  37.   else
  38.     jump
  39.   end if
  40.   cursor -1
  41. end 
  42.  
  43. on goSkills
  44.   global myLoadWindow,gWhere
  45.   cursor 4
  46.   if the movie = "Dict.dir" then
  47.     set i = 6
  48.     repeat while i < 43
  49.       set the visible of sprite i = false
  50.       puppetSprite i, 1
  51.       set the loc of sprite i to point(900,900)
  52.       puppetSprite i,0
  53.       set the visible of sprite i = true
  54.       set i = i + 1
  55.     end repeat
  56.   end if
  57.   
  58.   set gWhere = "Skills.dir"
  59.   if the movieName = "Tour.dir" then 
  60.     jumptour
  61.   else
  62.     jump
  63.   end if
  64.   cursor -1
  65. end 
  66.  
  67. on goFS
  68.   global myLoadWindow,gWhere
  69.   cursor 4
  70.   if the movie = "Dict.dir" then
  71.     set i = 6
  72.     repeat while i < 43
  73.       set the visible of sprite i = false
  74.       puppetSprite i, 1
  75.       set the loc of sprite i to point(900,900)
  76.       puppetSprite i,0
  77.       set the visible of sprite i = true
  78.       set i = i + 1
  79.     end repeat
  80.   end if
  81.   
  82.   set gWhere = "FS.dir"
  83.   if the movieName = "Tour.dir" then 
  84.     jumptour
  85.   else
  86.     jump
  87.   end if
  88.   cursor -1
  89. end 
  90.  
  91. on goOverview
  92.   global myLoadWindow,gWhere
  93.   cursor 4
  94.   if the movie = "Dict.dir" then
  95.     set i = 6
  96.     repeat while i < 43
  97.       set the visible of sprite i = false
  98.       puppetSprite i, 1
  99.       set the loc of sprite i to point(900,900)
  100.       puppetSprite i,0
  101.       set the visible of sprite i = true
  102.       set i = i + 1
  103.     end repeat
  104.   end if
  105.   
  106.   set gWhere = "Overview.dir"
  107.   if the movieName = "Tour.dir" then 
  108.     jumptour
  109.   else
  110.     jump
  111.   end if
  112.   cursor -1
  113. end 
  114.  
  115. on goTour
  116.   global myLoadWindow,gWhere
  117.   cursor 4
  118.   if the movie = "Dict.dir" then
  119.     set i = 6
  120.     repeat while i < 43
  121.       set the visible of sprite i = false
  122.       puppetSprite i, 1
  123.       set the loc of sprite i to point(900,900)
  124.       puppetSprite i,0
  125.       set the visible of sprite i = true
  126.       set i = i + 1
  127.     end repeat
  128.   end if
  129.   
  130.   set gWhere = "Tour.dir"
  131.   jump 
  132.   cursor -1
  133. end 
  134.  
  135.  
  136. --CG added this.
  137. on VideoFixWinF
  138.   
  139.   EXIT --PETEMACK 07.22.01
  140.   
  141.   global gdigitalvideo
  142.   if the machinetype = 256 then
  143.     --chris 10/28
  144.     if the moviename = "dict.dir" then
  145.       puppetsprite 39,1
  146.       set the loc of sprite 39 to point(900,900)
  147.       set the stagecolor to the stagecolor
  148.       updatestage
  149.       puppetsprite 39,0
  150.     else
  151.       --
  152.       put 1 into i
  153.       repeat while i < 49
  154.         put the height of sprite i into hivar
  155.         if hivar <> 0 then
  156.           put the member of sprite i into memvar
  157.           put the type of member memvar into typevar
  158.           if typevar = gdigitalvideo then
  159.             puppetsprite i,1
  160.             set the visibility of sprite i to 0
  161.             set the loc of sprite i to point (900,900)
  162.             set the stagecolor to the stagecolor
  163.             updatestage
  164.             puppetsprite i,0
  165.             exit repeat
  166.           end if
  167.         end if
  168.         set the visibility of sprite i to 1
  169.         put i + 1 into i
  170.       end repeat
  171.     end if
  172.   end if
  173. end
  174.  
  175.  
  176.  
  177. on jump
  178.   
  179.   --CG added this
  180.   VideoFixWinF
  181.   
  182.   global gWhere,myloadWindow
  183.   
  184.   
  185.   sound Stop 3
  186.   
  187.   set jumpTo = goCurrent()
  188.   preloadCast jumpTo
  189.   preloadCast jumpTo&"p"
  190.   ----PETEMACK 06.29.01   puppetPalette jumpTo&"p",60,1
  191.   updatestage
  192.   TellEveryPuppetToFuckOff
  193.   --go frame jumpTo
  194.   
  195.   set jumpTo = goNext(gWhere)
  196.   preloadCast jumpTo
  197.   preloadCast jumpTo&"p"
  198.   ----PETEMACK 06.29.01   puppetPalette 0,60,1
  199.   
  200.   go frame jumpTo
  201.   
  202.   loading -------------PETEMACK 07.04.01 08.15.01
  203.   
  204.   -- Below code attemps to correct possible memory leak problems with MIAW.  The changes below reflect a problem with White Artifact boxes that appear in place of the LOADING Facts MIAW.  Due to the LOADING MIAW process being birthed from the Parent window, doing a Go to Movie may be (Real technical term here) Screwing Director and leaving a possible memory conflict later.
  205.   
  206.   -- The below code will run the LOADING handler to display the LOADING MIAW and will preload the gWhere movie into ram.  If this preload takes longer than 10 seconds, the repeat loop will not execute and will directly go to the movie.
  207.   
  208.   --set the stageColor = the stageColor
  209.   
  210.   startTimer  -- Starts timer beffore the preload.
  211.   
  212.   --------------------PETEMACK 07.04.01 08.15.01
  213.   preLoadMovie gWhere  -- 
  214.   repeat while the timer < 1 * 60 
  215.     -- If preload took longer than 10 seconds, it will bypass this  else it will wait the remaining number of seconds until you reach 10 total.  
  216.   end repeat
  217.   
  218.   
  219.   --tell myloadWindow to updatestage
  220.   
  221.   ---PETEMACK 07.04.01 08.15.01
  222.   --  close myloadWindow  -- Closing and Forgetting in this movie will close the memory MIAW problem.
  223.   --  forget myloadWindow
  224.   
  225.   go movie gWhere
  226.   unload
  227.   set gWhere = ""
  228.   
  229. end
  230.  
  231. on jumpTour
  232.   
  233.   put 6 into i
  234.   repeat while i < 37
  235.     puppetsprite i,1
  236.     set the loc of sprite i to point (900,900)
  237.     set the visibility of sprite i to false
  238.     puppetsprite i,0
  239.     put 1 + i into i
  240.   end repeat
  241.   
  242.   --CG added this
  243.   VideoFixWinF
  244.   
  245.   global gWhere,myloadWindow
  246.   
  247.   sound Stop 3
  248.   
  249.   set jumpTo = goCurrent()
  250.   preloadCast jumpTo
  251.   preloadCast jumpTo&"p"
  252.   ----PETEMACK 06.29.01   puppetPalette jumpTo&"p",60,1
  253.   updatestage
  254.   TellEveryPuppetToFuckOff
  255.   --go frame jumpTo
  256.   
  257.   set jumpTo = goNext(gWhere)
  258.   preloadCast jumpTo
  259.   preloadCast jumpTo&"p"
  260.   ----PETEMACK 06.29.01   puppetPalette 0,60,1
  261.   
  262.   go frame jumpTo
  263.   
  264.   
  265.   -------------------PETEMACK 07.04.0  08.15.01
  266.   loading 
  267.   --Below code attemps to correct possible memory leak problems with MIAW.  The changes below reflect a problem with White Artifact boxes that appear in place of the LOADING Facts MIAW.  Due to the LOADING MIAW process being birthed from the Parent window, doing a Go to Movie may be (Real technical term here) Screwing Director and leaving a possible memory conflict later.
  268.   --The below code will run the LOADING handler to display the LOADING MIAW and will preload the gWhere movie into ram.  If this preload takes longer than 10 seconds, the repeat loop will not execute and will directly go to the movie.
  269.   --set the stageColor = the stageColor
  270.   startTimer  -- Starts timer beffore the preload.
  271.   preLoadMovie gWhere  -- 
  272.   unload
  273.   repeat while the timer < 1 * 60
  274.     -- If preload took longer than 10 seconds, it will bypass this  else it will wait the remaining number of seconds until you reach 10 total.
  275.   end repeat
  276.   --tell myloadWindow to updatestage
  277.   --    close myloadWindow  -- Closing and Forgetting in this movie will close the memory MIAW problem.
  278.   --    forget myloadWindow
  279.   
  280.   go movie gWhere
  281.   unload
  282.   set gWhere = ""
  283. end
  284.  
  285. on goCurrent
  286.   if the movieName = "Intro.dir" then return "MAIN"
  287.   if the movieName = "Main.dir" then return "MAIN"
  288.   if the movieName = "Dict.dir" then return "DT"
  289.   if the movieName = "Skills.dir" then return "SK"
  290.   if the movieName = "FS.dir" then return "FS"
  291.   if the movieName = "OverView.dir" then return "OV"
  292.   if the movieName = "Tour.dir" then return "TR"
  293. end
  294.  
  295. on goNext gWhere
  296.   if gWhere = "Main.dir" then return "MAIN"
  297.   if gWhere = "Dict.dir" then return "DT"
  298.   if gWhere = "Skills.dir" then return "SK"
  299.   if gWhere = "FS.dir" then return "FS"
  300.   if gWhere = "OverView.dir" then return "OV"
  301.   if gWhere = "Tour.dir" then return "TR"
  302. end
  303.  
  304. on TellEveryPuppetToFuckOff
  305.   repeat with i = 1 to 48
  306.     puppetsprite i,false
  307.   end repeat
  308.   -- no updatestage!!!!!!!!
  309.   -- no updatestage!!!!!!!!
  310.   -- no updatestage!!!!!!!! Director updates stage auto on go frame
  311. end
  312.  
  313. on TellEveryPuppetToFuckOn
  314.   repeat with i = 1 to 48
  315.     set the visible of sprite i = true
  316.   end repeat
  317.   -- no updatestage!!!!!!!!
  318.   -- no updatestage!!!!!!!!
  319.   -- no updatestage!!!!!!!! Director updates stage auto on go frame
  320. end
  321.  
  322.  
  323. on enableMenu state
  324.   global glist
  325.   set pos = 1
  326.   if (count(the windowlist) > 2 ) then
  327.     nothing
  328.   else
  329.     if state=FALSE then set glist=list()
  330.     set menuNum=the number of menus
  331.     repeat with i=1 to menuNum
  332.       set MenuName= the name of menu i
  333.       set n = the number of menuitems of menu MenuName
  334.       repeat with j=1 to n
  335.         if (the enabled of menuitem j of menu MenuName = state) then 
  336.           add glist,j&&MenuName  
  337.         end if
  338.         set the enabled of menuitem j of menu MenuName to state
  339.         if state=TRUE and pos <= count(glist) then
  340.           if j&&menuName = getAt(glist,pos) then
  341.             set pos=pos+1
  342.             set the enabled of menuitem j of menu MenuName to FALSE
  343.           end if
  344.         end if
  345.       end repeat
  346.     end repeat
  347.   end if
  348. end
  349.  
  350.