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

  1. -- 7/24 mdt
  2.  
  3. on startMovie
  4.   global gBSpList,gSpList,count,oldi
  5.   
  6.   global gWhere,myLoadWindow
  7.   set the visible of sprite 48 = false
  8.   updateStage
  9.   
  10.   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.
  11.   
  12.   set gWhere = ""
  13.   
  14.   insMenu 26,27
  15.   
  16.   set the enabled of menuItem 3 of menu "FingerSpelling" to false
  17.   set the enabled of menuItem 4 of menu "Go To" to false
  18.   
  19.   set oldi = 0
  20.   set count = 1
  21.   set gSpList = [a:87,b:88,c:89,d:90,e:91,"f":92,g:93,h:94,i:95,j:96,k:97,l:98,m:99,"n":100,o:101,p:102,q:103,r:104,s:105,t:106,u:107,v:108,w:109,x:110,y:111,z:112," ":1000]
  22.   
  23.   set gBSpList = [a:61,b:62,c:63,d:64,e:65,"f":66,g:67,h:68,i:69,j:70,k:71,l:72,m:73,"n":74,o:75,p:76,q:77,r:78,s:79,t:80,u:81,v:82,w:83,x:84,y:85,z:86]
  24.   
  25.   
  26.   if objectp(myLoadWindow) then 
  27.     close myLoadWindow
  28.     forget myLoadWindow
  29.   end if
  30.   
  31. end
  32.  
  33. on Roller rolloverlist
  34.   global oldi
  35.   
  36.   repeat with i in rolloverlist
  37.     if rollover(i) then
  38.       
  39.       set oldi = the castNum of sprite i
  40.       set the castNum of sprite i = (the castNum of sprite i) + 1
  41.       updatestage
  42.       
  43.       repeat while rollover(i) 
  44.         --updateStage
  45.         if the mouseDown then 
  46.           set the castNum of sprite i = (the castNum of sprite i) + 1
  47.           puppetSound "ClickLo" --, true
  48.           updatestage
  49.           repeat while the mouseDown
  50.             if not rollover(i) then 
  51.               set release = 1
  52.               exit repeat
  53.             end if
  54.           end repeat
  55.           if not release then
  56.             set the castNum of sprite i = (the castNum of sprite i) - 1
  57.             puppetSound "ClickHi" --, true
  58.             updatestage
  59.             exit repeat
  60.             pass
  61.           end if
  62.         end if
  63.         
  64.         updateStage
  65.       end repeat
  66.       
  67.       if release then 
  68.         
  69.         puppetSound "ClickHi" --, true
  70.         updatestage
  71.       end if
  72.       
  73.       set the castNum of sprite i = oldi
  74.       
  75.     end if
  76.     
  77.   end repeat
  78.   
  79. end Roller 
  80.  
  81. on rollCheck rolloverlist
  82.   global prevRollerDone,prevRollerDown
  83.   repeat with i in rolloverlist
  84.     
  85.     if rollover(i) then
  86.       --
  87.       puppetSprite i,true
  88.       
  89.       if i = prevRollerDown and rollover(i) then 
  90.         ------
  91.         if the mouseDown then
  92.           set the castNum of sprite i = (the castNum of sprite i)+1
  93.           puppetSound "ClickLo" --, true
  94.           updatestage
  95.           repeat while the mouseDown
  96.             
  97.           end repeat
  98.           if rollover(i) then
  99.             set the castNum of sprite i = (the castNum of sprite i)-2
  100.             puppetSound "ClickHi" --, true
  101.             set prevRollerDown = 0
  102.             puppetSprite i,false
  103.             updatestage
  104.             exit
  105.           end if
  106.         end if
  107.         ------
  108.       else 
  109.         set the castNum of sprite i = (the castNum of sprite i)+1
  110.         set prevRollerDown = i
  111.         updatestage
  112.       end if
  113.       
  114.       --
  115.     else
  116.       --
  117.       if i = prevRollerDown then set prevRollerDown = 0
  118.       puppetSprite i,false
  119.       updatestage
  120.       --
  121.     end if
  122.   end repeat
  123. end
  124.  
  125. on shiftKeyFilter key
  126.   set filterList = ["A":"a","B":"b","C":"c","D":"d","E":"e","F":"f","G":"g","H":"h","I":"i","J":"j","K":"k","L":"l","M":"m","N":"n","O":"o","P":"p","Q":"q","R":"r","S":"s","T":"t","U":"u","V":"v","W":"w","X":"x","Y":"y","Z":"z"]
  127.   
  128.   return (getaProp(filterList,key))
  129.   
  130. end
  131.  
  132.  
  133. --on makeList theList
  134. --  set tempList = [:]
  135. --  repeat with i = 1 to Count(theList)
  136. --    addProp(tempList,i,the rect of sprite (getAt(theList,i)))
  137. --  end repeat
  138. --  put tempList
  139. --end
  140.  
  141. --***************************************** PRINT FUNCTIONS **************************
  142. global doc,gW,gH
  143.  
  144. on PrintBitmap theCast
  145.   PrePrint 1
  146.   --content to be printed
  147.   drawPicture doc, member theCast, Rect(0,0,gW,gH) -- append doc, member theCast, TRUE
  148.   PostPrint
  149. end
  150.  
  151. on min a,b
  152.   -- a little script that returns the lesser of two values
  153.   if a<b then 
  154.     return a
  155.   else
  156.     return b
  157.   end if
  158. end
  159.  
  160. on PrintText textString
  161.   PrePrint
  162.   --content to be printed
  163.   append doc, RETURN & "American Sign Language 3.0", TRUE
  164.   append doc, RETURN & RETURN & textString
  165.   PostPrint
  166. end printText  
  167.  
  168.  
  169. on PrintStage theRect, landscape
  170.   PrePrint 1
  171.   drawStagePicture doc, Point(0,0), theRect, TRUE
  172.   PostPrint
  173. end 
  174.  
  175. on printWhatever
  176.   
  177.   if the frame = 2 then
  178.     PrintBitmap "small fingerspelling chart"
  179.   end if
  180.   
  181.   if the frameLabel = "puppet" then
  182.     PrintStage rect(235, 98, 402, 342),1
  183.   end if
  184.   
  185.   if the frameLabel = "puppet letters" then
  186.     repeat with i = 1 to 8
  187.       set the visible of sprite i = 0
  188.     end repeat
  189.     set the stageColor = 0
  190.     PrintStage rect(18,50,616,405),1  --PRINTSTAGE
  191.     repeat with i = 1 to 8
  192.       set the visible of sprite i = 1
  193.     end repeat
  194.     set the stageColor = 255
  195.   end if
  196.   
  197. end
  198.  
  199. on idle
  200.   exit
  201. end
  202.