home *** CD-ROM | disk | FTP | other *** search
/ Family Forum 256 / DR_BRAIN.BIN / Somc / WordWise.dir / 00001_Script_1 next >
Text File  |  1998-10-02  |  5KB  |  199 lines

  1.  
  2. on startMovie
  3.   
  4.   --* set the paths and exe for the setups
  5.   
  6.   global E1SETUP,E2SETUP,E3SETUP,E4SETUP,INSTALL1, INSTALL2
  7.   set E1SETUP to "@\SETUP.EXE" --ADAM
  8.   set E2SETUP to "@\SETUP.EXE" --algebra
  9.   set E3SETUP to ""
  10.   set E4SETUP to ""
  11.   
  12.   set INSTALL1 to "@\DX5ENG.EXE"
  13.   set INSTALL2 to "@\SETUP1.EXE"  
  14.   
  15.   
  16.   
  17.   --* set weblink URLs
  18.   
  19.   global LINK1,LINK2,LINK3,LINK4,LINK5,LINK6,LINK7,LINK8,LINK9,LINK10
  20.   set link1 to "http://www.woodberry.org/acad/hist/FRWEB/index.htm"
  21.   set link2 to "http://users.massed.net/~mdurant/AncientEgyptWebquest.htm"
  22.   set link3 to "http://www.finaid.org"
  23.   set link4 to "http://www.ucla.edu/"
  24.   set link5 to "http://www.clet.ait.ac.th/el21open.htm"
  25.   set link6 to "http://www.biochemist.com/"
  26.   set link7 to "http://www.intellicast.com/"
  27.   set link8 to "http://libertyonline.hypermall.com/index.html"
  28.   set link9 to "http://www.quoteland.com/"
  29.   set link10 to "http://www.unc.edu/~rowlett/units/index.html"
  30.   
  31.   
  32.   
  33.   --* This declares the variables for the finger cursor. *
  34.   
  35.   global wwFINGER, wwFINGERMASK
  36.   set wwFINGER to the memberNum of member "Finger1"
  37.   set wwFINGERMASK to the memberNum of member "Finger2"
  38.   
  39.   glowClear()
  40.   --* turn on altglows
  41.   glow(60,TRUE)
  42. end
  43.  
  44.  
  45.  
  46.  
  47. --* This handler hides/shows the glow images. eg: glow(5,TRUE) *
  48.  
  49. on glow WHICHSPRITE, TRUEORFALSE
  50.   set the visible of sprite WHICHSPRITE to TRUEORFALSE
  51. end glow
  52.  
  53. --* TURN OF ALL GLOWS ON START
  54. on glowClear
  55.   repeat with i = 50 to 65
  56.     glow(i)
  57.   end repeat
  58. end
  59.  
  60. --* This handler switches the text color for a glow effect. eg.textglow("Hello",1)*
  61.  
  62. on textglow WHICHMEMBER, COLORNUMBER
  63.   set the foreColor of member WHICHMEMBER to COLORNUMBER  
  64. end textglow
  65.  
  66. --* This is for using a HotSpot or Button for closing the window or a overlaid
  67. --* cover up sprite THIS IS AN EXAMPLE NOT A HANDLER
  68.  
  69. --on mouseUp
  70. --  global  enableHotspots
  71. --  doClick()
  72. --  if (the visible of sprite 35) then
  73. --    hideFonts()
  74. --    restoreBI()
  75. --  else
  76. --    close window "BIART"
  77. --    forget window "BIART"
  78. --    tell the stage to enableHotspots()
  79. --  end if
  80. --end mouseUp
  81.  
  82. --* THIS HANDLER EXAMPLE OF DISABLEING HOTSPOTS WHEN RUNNING MIAW*
  83. --on mouseEnter
  84. --  if not count(the windowList) then
  85. --    doRollover(52)
  86. --  end if
  87. --end
  88. --
  89. --
  90. --on mouseLeave
  91. --  if not count(the windowList) then
  92. --    doRollout(52)
  93. --  end if
  94. --end
  95.  
  96.  
  97.  
  98. --* THIS HANDLER OPEN AND CENTERS A MOVIE IN A WINDOW *
  99.  
  100. on openMIAW MYWINDOW
  101.   set myRect=the rect of window MYWINDOW
  102.   set myStage=the rect of the Stage
  103.   set myWidth=(getAt(myRect,3)-getAt(myRect,1))
  104.   set myHeight=(getAt(myRect,4)-getAt(myRect,2))
  105.   set myLocH=((getAt(myStage,3)+getAt(myStage,1))/2)-(myWidth/2)
  106.   set myLocV=((getAt(myStage,2)+getAt(myStage,4))/2)-(myHeight/2)
  107.   set myNewRect=rect(myLocH,myLocV,(myLocH+myWidth),(myLocV+myHeight))
  108.   set the rect of window MYWINDOW=myNewRect
  109.   set the windowType of window MYWINDOW to 2
  110.   open window MYWINDOW
  111. end openMIAW
  112.  
  113.  
  114. --* THESE HANDLERS TURN ON A GLOW, TURN POINTER A HAND AND PLAYS A SOUND *
  115. --
  116. --on doRollover numsprite
  117. --  glow(numsprite,TRUE)
  118. --  global finger,fingermask
  119. --  cursor[finger,fingermask]
  120. --  updatestage
  121. --  puppetsound 1, "rollsound"
  122. --  --  repeat while soundbusy(1)
  123. --  --  end repeat
  124. --end
  125.  
  126.  
  127.  
  128.  
  129. --* THIS HANDLER TURNS THE SPRITE PASSED TO IT TO INVISIBLE AND RESETS THE CURSOR
  130. on doRollout numsprite
  131.   glow(numsprite,FALSE)
  132.   cursor 0
  133. end
  134.  
  135. --* PLAYS A CLICK SOUND
  136.  
  137. on doClick
  138.   puppetsound 1,"clicksound"
  139.   updateStage
  140. end
  141.  
  142. --* CHECK THE ANSWER FOR WORDWIZE
  143.  
  144. on  checkAnswer 
  145.   
  146.   global CORRECT,Ncount,ANSWER,TRIES,RIGHT
  147.   
  148.   put line Ncount of the text of member "ww3" into member "definition" 
  149.   set the fontSize of member "definition" to 18
  150.   set the fontstyle of member "definition" to "bold" 
  151.   glow(20,TRUE)
  152.   set TRIES to TRIES + 1
  153.   if answer = CORRECT then 
  154.     glow(52,TRUE)
  155.     puppetsound 1,"Woww1"
  156.     updateStage
  157.     set RIGHT to RIGHT + 1
  158.   else 
  159.     glow(53,TRUE)
  160.     puppetsound 1,"Buzzer2"
  161.     updateStage
  162.   end if
  163. end
  164.  
  165. on finish
  166.   
  167.   global TRIES,RIGHT,scoreSTR
  168.   
  169.   go to "FIN"
  170.   if (TRIES) THEN
  171.     if ((float(RIGHT) / float(TRIES)) > .49) then
  172.       puppetsound 1,"Glfclap1"
  173.       updateStage
  174.     end if
  175.   end if
  176.   set scoreSTR2 to "YOU GOT"&&string(RIGHT)&&"OUT OF"&&string(TRIES)&&"RIGHT"
  177.   set the text of member "scoreSTR" to scoreSTR2
  178.   updateStage
  179.   
  180. end
  181.  
  182.  
  183.  
  184. on doRollover numsprite,SOUNDNUM
  185.   glow(numsprite,TRUE)
  186.   global wwfinger,wwfingermask
  187.   cursor[wwfinger,wwfingermask]
  188.   updatestage  
  189.   case SOUNDNUM of
  190.     1:
  191.       puppetsound 1, "rollsound"
  192.       --  repeat while soundbusy(1)
  193.       --  end repeat
  194.     2:
  195.       puppetsound 1, "rollsound2"
  196.       --  repeat while soundbusy(1)
  197.       --  end repeat      
  198.   end case  
  199. end