home *** CD-ROM | disk | FTP | other *** search
/ What PC? 1997 December / WPCDEC97.ISO / NSCAPE / PLUGINS / NP16DSW / INTRO.DCR / 00002.ls next >
Encoding:
Text File  |  1996-07-30  |  4.6 KB  |  125 lines

  1. on startMovie
  2.   global theHeight1968, theWidth1968, myStageColor1968, doCredits1968
  3.   set doCredits1968 to 0
  4.   set myStageColor1968 to externalParamValue("bgColor")
  5.   if voidp(myStageColor1968) then
  6.     set myStageColor1968 to "#FFFFFF"
  7.   end if
  8.   set theWidth1968 to the stageRight - the stageLeft
  9.   set theHeight1968 to the stageBottom - the stageTop
  10.   set the puppet of sprite 1 to 1
  11.   if (the width of sprite 1 < theWidth1968) and (the height of sprite 1 < theHeight1968) then
  12.     set the visible of sprite 1 to 1
  13.     set the loc of sprite 1 to point(theWidth1968 / 2, theHeight1968 / 2)
  14.   else
  15.     set the visible of sprite 1 to 0
  16.   end if
  17.   if (char 2 of myStageColor1968 > 8) or (char 4 of myStageColor1968 > 8) or (char 6 of myStageColor1968 > 8) then
  18.     set the ink of sprite 1 to 35
  19.   else
  20.     set the ink of sprite 1 to 33
  21.   end if
  22. end
  23.  
  24. on stopMovie
  25.   clearGlobals()
  26. end
  27.  
  28. on idle
  29.   global doCredits1968, theWidth1968, theHeight1968, stageRows1968
  30.   if doCredits1968 then
  31.     showOneCredit()
  32.   else
  33.     slipAway()
  34.   end if
  35. end
  36.  
  37. on slipAway
  38.   global theWidth1968, theHeight1968
  39.   if rollOver(1) then
  40.     set diffvector to (the loc of sprite 1 - point(the mouseH, the mouseV)) / 2
  41.     set oldLoc to the loc of sprite 1
  42.     set newLoc to the loc of sprite 1 + diffvector
  43.     set the loc of sprite 1 to newLoc
  44.     updateStage()
  45.     if (the right of sprite 1 > theWidth1968) or (the bottom of sprite 1 > theHeight1968) or (the left of sprite 1 < 0) or (the top of sprite 1 < 0) then
  46.       set the loc of sprite 1 to oldLoc
  47.       updateStage()
  48.     end if
  49.   end if
  50. end
  51.  
  52. on startupCredits
  53.   global doCredits1968, stageRows1968, stageCols1968, theHeight1968, theWidth1968, tickCount1968
  54.   set the visible of sprite 1 to 0
  55.   set the puppet of sprite 4 to 1
  56.   set the visible of sprite 4 to 1
  57.   set stageRows1968 to theHeight1968 / 20
  58.   set stageCols1968 to theWidth1968 / 120
  59.   set tickCount1968 to the ticks
  60.   set doCredits1968 to 1
  61.   repeat while the ticks < (tickCount1968 + 120)
  62.     showOneCredit()
  63.   end repeat
  64. end
  65.  
  66. on showOneCredit
  67.   global stageRows1968, stageCols1968
  68.   set the loc of sprite 4 to point(-100, -100)
  69.   updateStage()
  70.   set yrow to random(stageRows1968) - 1
  71.   set yloc to yrow * 20
  72.   set xloc to (random(stageCols1968) - 1) * 120
  73.   if yrow mod 2 then
  74.     set xloc to xloc + 50
  75.   end if
  76.   set the foreColor of member 6 to random(power(2, the colorDepth)) - 1
  77.   set the loc of sprite 4 to point(xloc, yloc)
  78.   set the text of field 6 to randomPerson()
  79.   updateStage()
  80. end
  81.  
  82. on showCredits
  83.   global theHeight1968, theWidth1968
  84.   if (theWidth1968 > 100) and (theHeight1968 > 100) then
  85.     set the visible of sprite 1 to 0
  86.     set the member of sprite 1 to 5
  87.     set the ink of sprite 1 to 0
  88.     if theWidth1968 > 250 then
  89.       set the width of sprite 1 to 250
  90.     else
  91.       set the width of sprite 1 to theWidth1968 - 10
  92.     end if
  93.     if theHeight1968 > 300 then
  94.       set the height of sprite 1 to 300
  95.     else
  96.       set the height of sprite 1 to theHeight1968 - 10
  97.     end if
  98.     set the loc of sprite 1 to point((theWidth1968 / 2) - (the width of sprite 1 / 2), (theHeight1968 / 2) - (the height of sprite 1 / 2))
  99.     set the visible of sprite 1 to 1
  100.     updateStage()
  101.   end if
  102. end
  103.  
  104. on randomPerson
  105.   set myList to "Harry Chesley, Ken Day, Sarah Allen, Chris Rogers, Lisa Gelobter, Ely Greenfield, Harry Chesley, Ken Day, Sarah Allen, Chris Rogers, Lisa Gelobter, Ely Greenfield, Peter Grandmaison, Chris Walcott, Alex Beyk, Karl Miller, Bill Gibson, Jake Sapirstein, Dave Dennick, Alan Isaacs, Michael Roeder, Buzz Kettles, Sally Hebble, Steve Pasos, Don Kimm, John Newlin, Werner Sharp, Heather Rose, Phil Schiller, Leesa Lee, John Thompson, Dan Sadowski, Glenn Ruehle, Slavik Lozben, Chris Yerga, Marshall Halford, Sherri Sheridan, Spike, macromedia.com, Victoria Dawson, Christine McCarthy, Alex Zavatone, Murat Konar, Mats Myrberg, David Simmons, Mark Sanford, Brett Stewart, Aric Rubin, Ben Dillon, Pete Caban, Fred Sharples, Mike Seery, Fred Benz, Jeff Schwamberger, Brent Wood, Craig Bryars, Norm Meyrowitz, Bud Colligan, John Dowdell, elmo-l, shocker.com, shockwave-l, direct-l, Carrie Myers, David Curtis, Joe Dunn, Rocky Vienna, Joseph Ansanelli"
  106.   if random(3) = 1 then
  107.     return "Shockwave"
  108.   end if
  109.   set i to random(the number of items in myList)
  110.   set theName to item i of myList
  111.   if (random(20) = 1) and (the number of words in theName > 1) then
  112.     set theName to word 1 of theName
  113.     if the last char in theName = "s" then
  114.       set theName to theName & "' mother"
  115.     else
  116.       set theName to theName & "'s mother"
  117.     end if
  118.   else
  119.     if random(50) = 1 then
  120.       set theName to "you"
  121.     end if
  122.   end if
  123.   return theName
  124. end
  125.