home *** CD-ROM | disk | FTP | other *** search
/ Webster's Millennium Amer…Sign Language Dictionary / ASL.ISO / mac / Overview.dir / 00001_Script_1 next >
Text File  |  2001-09-16  |  15KB  |  503 lines

  1. -- 7/24 mdt
  2.  
  3. on startMovie
  4.   global hBeenThereList,hLast,rBeenThereList,rLast,sBeenThereList,sLast,dBeenThereList,dLast
  5.   global gBeenThereList,gLast,eBeenThereList,eLast,fBeenThereList,fLast
  6.   
  7.   global gWhere,myLoadWindow
  8.   
  9.   
  10.   
  11.   -- ***** Stilo  10-10 2.00pm ******
  12.   
  13.   if the machineType = 256 then
  14.     set tempDelimiter = "\"
  15.   else
  16.     set TempDelimiter = ":"
  17.   end if
  18.   
  19.   importFileInto member "Video", the pathname & "Template" & TempDelimiter & "ABANDON.MOV"
  20.   set the name of member 79 = "Video" --"ABANDON.MOV"
  21.   set the loop of member "Video" = 1
  22.   
  23.   -- *******************************
  24.   
  25.   
  26.   InitMouse  -- This handler will initiate a when mousedown then handler for processing the mouse event queue.  It is located in the shared cast and called in the start of each director movie.
  27.   
  28.   set gWhere = "" -- put this at the top
  29.   
  30.   insMenu 183,184
  31.   --installMenu 26
  32.   
  33.   set the enabled of menuItem 5 of menu "Go To" to false
  34.   
  35.   --  set hBeenThereList = [9]
  36.   --  set hLast = 9
  37.   --  set rBeenThereList = [13]
  38.   --  set rLast = 13
  39.   --  set sBeenThereList = [13]
  40.   --  set sLast = 13
  41.   --  set dBeenThereList = [13]
  42.   --  set dLast = 13
  43.   --  set gBeenThereList = [14]
  44.   --  set gLast = 14
  45.   --  set eBeenThereList = [14]
  46.   --  set eLast = 14
  47.   --  set fBeenThereList = [14]
  48.   --  set fLast = 14
  49.   
  50.   repeat with i = 40 to 43
  51.     set the visible of sprite i = false
  52.   end repeat
  53.   getUserPrefs
  54.   setUserPrefs
  55.   init6
  56.   if objectp(myLoadWindow) then 
  57.     close myLoadWindow
  58.     forget myLoadWindow -- put this at the bottom
  59.   end if
  60.   
  61.   FixFontWierdThing
  62.   
  63. end
  64.  
  65. on stopMovie
  66.   global gAuthorMode
  67.   
  68.   
  69.   -- **** Stilo *******************************
  70.   
  71.   -- Below code relates only if we start having problems with The importFileIntoCast when playing back in a projector (From the stub).  (USe 'ASL82.DIR (Stilo) in this case.  (This uses a global variable gAuthorMode to determine to reset on stopmovie or not.
  72.   
  73.   --  if gAuthorMode = "NO" then  -- Only check for 1 state  (Never gets set to YES )  This is
  74.   --    --                          because the stub is the only movie that will set this variable.
  75.   --    
  76.   --    nothing
  77.   --  else
  78.   
  79.   set the media of member "video" = the media of member "videoPictTemplate"  -- This may also clear up some artifacts for video on screen when jumping to another movie.  
  80.   
  81.   -- This logic (If in Authoring Mode) will replace the 'Video" cast member which is the actual Video template cast to a bitmap.  So no links are established once stopping this movie.
  82.   
  83.   --end if
  84.   
  85.   -- ************************************************
  86. end
  87.  
  88. on idle
  89.   exit
  90. end
  91.  
  92.  
  93.  
  94. on Roller rolloverlist, checkList
  95.   --put rolloverlist
  96.   if voidP(checkList) then EXIT  --PETEMACK 06.20.01
  97.   
  98.   global oldi
  99.   
  100.   if the visible of sprite 48 then set the visible of sprite 48 = 0
  101.   
  102.   repeat with i in rolloverlist
  103.     if rollover(i) then
  104.       
  105.       -- if the runmode = "author" then put i && "i"
  106.       
  107.       if getOne(checkList,i) = 0 then
  108.         set oldi = the castNum of sprite i
  109.         set the castNum of sprite i = (the castNum of sprite i) + 1
  110.         updatestage
  111.         
  112.         repeat while rollover(i)
  113.           updateStage
  114.           if the mouseDown then 
  115.             
  116.             -- **** Stilo *****
  117.             
  118.             -- It seems that this roller script still launches the mouseDown script attached to an invisible sprite.  The below code is a cluge trap.
  119.             
  120.             if the visible of sprite i = 0 then
  121.               exit
  122.             else
  123.               
  124.               set the castNum of sprite i = (the castNum of sprite i) + 1
  125.               puppetSound "ClickLo", true
  126.               updatestage
  127.               repeat while the mouseDown
  128.                 
  129.                 if the frameLabel = "r2" and i = 23 or the frameLabel = "r2" and i = 24 then
  130.                   mouseDown(script ((the name of cast the castNum of sprite i) & " script"))
  131.                 end if
  132.                 
  133.                 if the frameLabel = "s2" and i = 25 or the frameLabel = "s2" and i = 26 then
  134.                   mouseDown(script ((the name of cast the castNum of sprite i) & " script"))
  135.                 end if
  136.                 
  137.                 if the frameLabel = "d2" and i = 28 or the frameLabel = "d2" and i = 29 then
  138.                   mouseDown(script ((the name of cast the castNum of sprite i) & " script"))
  139.                 end if
  140.                 
  141.                 if the frameLabel = "g2" and i = 36 or the frameLabel = "g2" and i = 37 then
  142.                   mouseDown(script ((the name of cast the castNum of sprite i) & " script"))
  143.                 end if
  144.                 
  145.                 if the frameLabel = "g2" and i = 29 or the frameLabel = "g2" and i = 31 then
  146.                   mouseDown(script ((the name of cast the castNum of sprite i) & " script"))
  147.                 end if
  148.                 
  149.                 if the frameLabel = "e2" and i = 33 or the frameLabel = "e2" and i = 34 then
  150.                   mouseDown(script ((the name of cast the castNum of sprite i) & " script"))
  151.                 end if
  152.                 
  153.                 if the frameLabel = "e2" and i = 26 or the frameLabel = "e2" and i = 28 then
  154.                   mouseDown(script ((the name of cast the castNum of sprite i) & " script"))
  155.                 end if
  156.                 
  157.                 if the frameLabel = "f2" and i = 28 or the frameLabel = "f2" and i = 29 then
  158.                   mouseDown(script ((the name of cast the castNum of sprite i) & " script"))
  159.                 end if
  160.                 
  161.                 if the frameLabel = "f2" and i = 20 or the frameLabel = "f2" and i = 22 then
  162.                   mouseDown(script ((the name of cast the castNum of sprite i) & " script"))
  163.                 end if
  164.                 
  165.                 if not rollover(i) then 
  166.                   set release = 1
  167.                   exit repeat
  168.                 end if
  169.                 
  170.               end repeat
  171.               if not release then
  172.                 set the castNum of sprite i = (the castNum of sprite i) - 1
  173.                 puppetSound "ClickHi", true
  174.                 updatestage
  175.                 exit repeat
  176.                 pass
  177.               end if
  178.             end if
  179.           end if
  180.           
  181.         end repeat
  182.         
  183.         if release then 
  184.           
  185.           puppetSound "ClickHi", true
  186.           updatestage
  187.         end if
  188.         
  189.         set the castNum of sprite i = oldi
  190.       else
  191.         repeat while rollover(i)
  192.           updateStage
  193.           if the mouseDown then
  194.             puppetSound "ClickLo", true
  195.             updatestage
  196.             repeat while the mouseDown
  197.               if not rollover(i) then 
  198.                 set release = 1
  199.                 exit repeat
  200.               end if
  201.             end repeat
  202.             if not release then
  203.               --set the castNum of sprite i = (the castNum of sprite i) - 1
  204.               puppetSound "ClickHi", true
  205.               updatestage
  206.               exit repeat
  207.               pass
  208.             end if
  209.           end if
  210.         end repeat
  211.       end if
  212.     end if
  213.     
  214.   end repeat
  215.   
  216. end Roller 
  217.  
  218. on Roller2 rolloverlist
  219.   global oldi
  220.   
  221.   repeat with i in rolloverlist
  222.     if rollover(i) then
  223.       
  224.       set oldi = the castNum of sprite i
  225.       set the castNum of sprite i = (the castNum of sprite i) + 1
  226.       updatestage
  227.       
  228.       repeat while rollover(i)
  229.         updateStage
  230.         if the mouseDown then 
  231.           --set the castNum of sprite i = (the castNum of sprite i) + 1
  232.           puppetSound "ClickLo", true
  233.           updatestage
  234.           repeat while the mouseDown
  235.             if not rollover(i) then 
  236.               set release = 1
  237.               exit repeat
  238.             end if
  239.           end repeat
  240.           if not release then
  241.             --set the castNum of sprite i = (the castNum of sprite i) - 1
  242.             puppetSound "ClickHi", true
  243.             updatestage
  244.             exit repeat
  245.             pass
  246.           end if
  247.         end if
  248.       end repeat
  249.       
  250.       if release then 
  251.         
  252.         puppetSound "ClickHi", true
  253.         updatestage
  254.       end if
  255.       
  256.       set the castNum of sprite i = oldi
  257.       
  258.     end if
  259.     
  260.   end repeat
  261.   
  262. end Roller2 
  263.  
  264.  
  265. on Roller3 rolloverlist
  266.   global oldj
  267.   
  268.   repeat with i in rolloverlist
  269.     if rollover(i) then
  270.       
  271.       set oldj = the castNum of sprite i
  272.       set the castNum of sprite i = (the castNum of sprite i) + 1
  273.       updatestage
  274.       
  275.       repeat while rollover(i)
  276.         updateStage
  277.         if the mouseDown then 
  278.           set the castNum of sprite i = (the castNum of sprite i) + 1
  279.           puppetSound "ClickLo", true
  280.           updatestage
  281.           repeat while the mouseDown
  282.             if i = 31 then mouseDown(script "scrollUp")
  283.             if i = 32 then mouseDown(script "scrollDown")
  284.             if not rollover(i) then 
  285.               set release = 1
  286.               exit repeat
  287.             end if
  288.           end repeat
  289.           if not release then
  290.             set the castNum of sprite i = (the castNum of sprite i) - 1
  291.             puppetSound "ClickHi", true
  292.             updatestage
  293.             exit repeat
  294.             pass
  295.           end if
  296.         end if
  297.       end repeat
  298.       
  299.       if release then
  300.         puppetSound "ClickHi", true
  301.         updatestage
  302.       end if
  303.       
  304.       set the castNum of sprite i = oldj
  305.       
  306.     end if
  307.     
  308.   end repeat
  309.   
  310. end Roller3 
  311.  
  312.  
  313. on Roller4 rolloverlist, checkList
  314.   global oldi
  315.   
  316.   
  317.   repeat with i in rolloverlist
  318.     if rollover(i) then
  319.       if getOne(checkList,i) = 0 then
  320.         set oldi = the castNum of sprite i
  321.         set the castNum of sprite i = (the castNum of sprite i) + 1
  322.         updatestage
  323.         
  324.         repeat while rollover(i)
  325.           updateStage
  326.           if the mouseDown then 
  327.             set the castNum of sprite i = (the castNum of sprite i) + 1
  328.             puppetSound "ClickLo", true
  329.             updatestage
  330.             repeat while the mouseDown
  331.               if not rollover(i) then 
  332.                 set release = 1
  333.                 exit repeat
  334.               end if
  335.             end repeat
  336.             if not release then
  337.               set the castNum of sprite i = (the castNum of sprite i) - 1
  338.               puppetSound "ClickHi", true
  339.               updatestage
  340.               exit repeat
  341.               pass
  342.             end if
  343.           end if
  344.         end repeat
  345.         
  346.         if release then 
  347.           
  348.           puppetSound "ClickHi", true
  349.           updatestage
  350.         end if
  351.         
  352.         --set the castNum of sprite i = oldi
  353.       end if
  354.     end if
  355.     
  356.   end repeat
  357.   
  358. end Roller4 
  359.  
  360. on goResources
  361.   TellEveryPuppetToFuckOff
  362.   TellEveryPuppetToFuckOn
  363.   go frame "Resources"
  364.   puppetSprite 25,true
  365.   set the enabled of menuitem 1 of menu "Overview" to true
  366.   set the enabled of menuitem 2 of menu "Overview" to false
  367.   set the enabled of menuitem 3 of menu "Overview" to true
  368. end 
  369.  
  370. on goHistory
  371.   TellEveryPuppetToFuckOff
  372.   TellEveryPuppetToFuckOn
  373.   repeat with i = 40 to 43
  374.     set the visible of sprite i  = false
  375.     puppetSprite i, false
  376.   end repeat
  377.   go frame "History"
  378.   set the enabled of menuitem 1 of menu "Overview" to false
  379.   set the enabled of menuitem 2 of menu "Overview" to true
  380.   set the enabled of menuitem 3 of menu "Overview" to true
  381. end 
  382.  
  383. on FixFontWierdThing
  384.   -- This will fix the bad characters on the PC
  385.   -- DO NOT OPEN AND SAVE THIS FILE ON THE PC
  386.   -- But, if you did. Open this file on the Mac and Fix the bad characters manually. 
  387.   -- This can be done easily with find and replace. They are È,…, and Û
  388.   
  389.   if the machineType = 256 then
  390.     
  391.     put ["É":"…","é":"È","ó":"Û"] into wierdFontList
  392.     put [456,458,460,462,463,465,466,476] into badCastList
  393.     
  394.     repeat with i = 1 to count(badCastList)
  395.       put the text of cast getAt(badCastList,i) into whatText
  396.       repeat with j = 1 to count(wierdFontList)
  397.         if whatText contains getPropAt(wierdFontList, j) then
  398.           repeat while offset(getPropAt(wierdFontList, j), whatText) <> 0
  399.             put getAt(wierdFontList, j) into char offset(getPropAt(wierdFontList, j), whatText) of whatText
  400.           end repeat
  401.         end if
  402.       end repeat
  403.       set the text of cast getAt(badCastList,i) to whatText
  404.     end repeat
  405.   end if
  406.   
  407. end
  408.  
  409.  
  410.  
  411.  
  412. ----CG added this to fix the video for windows problems...
  413. on VideoFixWin spritechan
  414.   if the machinetype = 256 then
  415.     puppetsprite spritechan,1
  416.     set the loc of sprite spritechan to point (900,900)
  417.     set the visibility of sprite spritechan to 0
  418.     set the stagecolor to the stagecolor
  419.     updatestage
  420.     puppetsprite spritechan,0
  421.     set the visibility of sprite spritechan to 1
  422.   end if
  423. end
  424.  
  425.  
  426. ---CG added this to fix that weird, out of sync with timeline problem that
  427. ---adam discovered.  NOTE, this won't fix all weird things, just this weird thing.
  428.  
  429. on fixweirdthing
  430.   global hBeenThereList, hLast
  431.   set the castNum of sprite hLast = the castNum of sprite (hLast) + 1
  432.   set hLast = 9
  433.   
  434.   set the castNum of sprite 37 = 579
  435.   set the castNum of sprite 36 = 574
  436.   set the castNum of sprite 4 = 451
  437.   set the castNum of sprite 38 = 53
  438.   set the castNum of sprite 39 = 350
  439.   
  440.   if getOne(hBeenThereList,hLast) = 0 then 
  441.     
  442.     append(hBeenThereList,hLast)
  443.     set the castNum of sprite hLast = the castNum of sprite hLast + 1
  444.   else
  445.     set the castNum of sprite hLast = the castNum of sprite hLast - 1
  446.   end if
  447.   
  448.   if the puppet of sprite 40 = true then
  449.     repeat with i = 40 to 43
  450.       --set the visible of sprite i  = false
  451.       puppetSprite i, false
  452.     end repeat
  453.     go the frame
  454.   end if
  455.   
  456.   updateStage
  457.   if the height of cast (the castNum of sprite 4) > the height of sprite 5 then
  458.     set the locV of sprite 4 = 86
  459.     repeat with i = 40 to 43
  460.       set the visible of sprite i  = true
  461.       puppetSprite i, true
  462.     end repeat
  463.     updateStage
  464.   else
  465.     set the locV of sprite 4 = 86
  466.     repeat with i = 40 to 43
  467.       set the visible of sprite i  = false
  468.       puppetSprite i, false
  469.     end repeat
  470.     updateStage
  471.   end if
  472. end
  473.  
  474.  
  475.  
  476.  
  477.  
  478. on goArt
  479.   TellEveryPuppetToFuckOff
  480.   TellEveryPuppetToFuckOn
  481.   go frame "Art"
  482.   set the enabled of menuitem 1 of menu "Overview" to true
  483.   set the enabled of menuitem 2 of menu "Overview" to true
  484.   set the enabled of menuitem 3 of menu "Overview" to false
  485. end 
  486.  
  487. on TellEveryPuppetToFuckOn
  488.   repeat with i = 1 to 48
  489.     set the visible of sprite i = true
  490.   end repeat
  491. end
  492.  
  493. on init6
  494.   global TEMPLATE2, KNOB2, minPos2, maxPos2
  495.   
  496.   set TEMPLATE2 = 41
  497.   set KNOB2 = 42
  498.   puppetSprite KNOB2, true
  499.   set the immediate of sprite KNOB2 to true
  500.   set minPos2  = the left of sprite TEMPLATE2
  501.   set maxPos2 = the right of sprite TEMPLATE2
  502.   updateStage
  503. end init6