home *** CD-ROM | disk | FTP | other *** search
/ The Net: Ultimate Internet Guide / WWLCD1.ISO / mac / SiteBldr / NATURE / ACTIVATE / SW.CAB / INTRO.DCR / 00002.ls next >
Encoding:
Text File  |  1996-07-05  |  4.3 KB  |  115 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. end
  18.  
  19. on idle
  20.   global doCredits1968, theWidth1968, theHeight1968, stageRows1968
  21.   if doCredits1968 then
  22.     showOneCredit()
  23.   else
  24.     slipAway()
  25.   end if
  26. end
  27.  
  28. on slipAway
  29.   global theWidth1968, theHeight1968
  30.   if rollOver(1) then
  31.     set diffvector to (the loc of sprite 1 - point(the mouseH, the mouseV)) / 2
  32.     set oldLoc to the loc of sprite 1
  33.     set newLoc to the loc of sprite 1 + diffvector
  34.     set the loc of sprite 1 to newLoc
  35.     updateStage()
  36.     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
  37.       set the loc of sprite 1 to oldLoc
  38.       updateStage()
  39.     end if
  40.   end if
  41. end
  42.  
  43. on startupCredits
  44.   global doCredits1968, stageRows1968, stageCols1968, theHeight1968, theWidth1968, tickCount1968
  45.   set the visible of sprite 1 to 0
  46.   set the puppet of sprite 4 to 1
  47.   set the visible of sprite 4 to 1
  48.   set stageRows1968 to theHeight1968 / 20
  49.   set stageCols1968 to theWidth1968 / 120
  50.   set tickCount1968 to the ticks
  51.   set doCredits1968 to 1
  52.   repeat while the ticks < (tickCount1968 + 120)
  53.     showOneCredit()
  54.   end repeat
  55. end
  56.  
  57. on showOneCredit
  58.   set the loc of sprite 4 to point(-100, -100)
  59.   updateStage()
  60.   set yrow to random(stageRows) - 1
  61.   set yloc to yrow * 20
  62.   set xloc to (random(stageCols) - 1) * 120
  63.   if yrow mod 2 then
  64.     set xloc to xloc + 50
  65.   end if
  66.   set the foreColor of member 6 to random(power(2, the colorDepth)) - 1
  67.   set the loc of sprite 4 to point(xloc, yloc)
  68.   set the text of field 6 to randomPerson()
  69.   updateStage()
  70. end
  71.  
  72. on showCredits
  73.   global theHeight1968, theWidth1968
  74.   if (theWidth1968 > 100) and (theHeight1968 > 100) then
  75.     set the visible of sprite 1 to 0
  76.     set the member of sprite 1 to 5
  77.     set the ink of sprite 1 to 0
  78.     if theWidth1968 > 250 then
  79.       set the width of sprite 1 to 250
  80.     else
  81.       set the width of sprite 1 to theWidth1968 - 10
  82.     end if
  83.     if theHeight1968 > 300 then
  84.       set the height of sprite 1 to 300
  85.     else
  86.       set the height of sprite 1 to theHeight1968 - 10
  87.     end if
  88.     set the loc of sprite 1 to point((theWidth1968 / 2) - (the width of sprite 1 / 2), (theHeight1968 / 2) - (the height of sprite 1 / 2))
  89.     set the visible of sprite 1 to 1
  90.     updateStage()
  91.   end if
  92. end
  93.  
  94. on randomPerson
  95.   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 Grandmason, 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 Shiller, 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 Myberg, David Simmons, Mark Sanford, Brett Stuart, Aric Rubin, Ben Dillon, Pete Caban, 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"
  96.   if random(3) = 1 then
  97.     return "Shockwave"
  98.   end if
  99.   set i to random(the number of items in myList)
  100.   set theName to item i of myList
  101.   if (random(20) = 1) and (the number of words in theName > 1) then
  102.     set theName to word 1 of theName
  103.     if the last char in theName = "s" then
  104.       set theName to theName & "' mother"
  105.     else
  106.       set theName to theName & "'s mother"
  107.     end if
  108.   else
  109.     if random(50) = 1 then
  110.       set theName to "you"
  111.     end if
  112.   end if
  113.   return theName
  114. end
  115.