home *** CD-ROM | disk | FTP | other *** search
/ Shocking The Web CD-ROM / SHOCK_CD.ISO / pc / tutorial / casestdy / ch12_isn / ledshow.dcr / 00050.ls < prev    next >
Encoding:
Text File  |  1996-11-13  |  1.5 KB  |  62 lines

  1. global gMyMessage, gMessageLength, gIterCount, gCharToNumList, gCastNumList, gStopPoint, gStopFlag, gHowLongHold, gBlinkFlag, gBlinkOffset, gNumCharsToBlink, gStopOffset, gCharColorList, gURLName
  2.  
  3. on startMovie
  4.   puppetTempo(10)
  5.   set gStopFlag to 0
  6.   set gStopPoint to 36
  7.   set gHowLongHold to 5
  8.   repeat with x = 12 to 47
  9.     puppetSprite(x, 1)
  10.   end repeat
  11.   readLEDText()
  12. end
  13.  
  14. on clearNHold
  15.   repeat with x = 12 to 47
  16.     set the castNum of sprite x to the number of cast " "
  17.     set the visible of sprite x to 1
  18.   end repeat
  19.   go("Set Up")
  20.   updateStage()
  21. end
  22.  
  23. on writeMessage
  24.   if gIterCount >= (count(gCharToNumList) - 35) then
  25.     set gIterCount to 0
  26.   else
  27.     repeat with x = 47 down to 12
  28.       set myNum to getAt(gCharToNumList, x - 11 + gIterCount)
  29.       set the castNum of sprite x to myNum
  30.       set the foreColor of sprite x to getAt(gCharColorList, x - 11 + gIterCount)
  31.     end repeat
  32.     updateStage()
  33.     set gIterCount to gIterCount + 1
  34.   end if
  35. end
  36.  
  37. on writeNStop
  38.   if gIterCount >= (count(gCharToNumList) - 35) then
  39.     set gIterCount to 0
  40.   else
  41.     if gIterCount = gStopPoint then
  42.       if gBlinkFlag then
  43.         go("HoldNBlink")
  44.       else
  45.         go("Hold")
  46.       end if
  47.     else
  48.       repeat with x = 47 down to 12
  49.         set myNum to getAt(gCharToNumList, x - 11 + gIterCount)
  50.         set the castNum of sprite x to myNum
  51.         set the foreColor of sprite x to getAt(gCharColorList, x - 11 + gIterCount)
  52.       end repeat
  53.       updateStage()
  54.       set gIterCount to gIterCount + 1
  55.     end if
  56.   end if
  57. end
  58.  
  59. on readLEDText
  60.   getNetText("LEDText.txt")
  61. end
  62.