home *** CD-ROM | disk | FTP | other *** search
- global gMyMessage, gMessageLength, gIterCount, gCharToNumList, gCastNumList, gStopPoint, gStopFlag, gHowLongHold, gBlinkFlag, gBlinkOffset, gNumCharsToBlink, gStopOffset, gCharColorList, gURLName
-
- on startMovie
- puppetTempo(10)
- set gStopFlag to 0
- set gStopPoint to 36
- set gHowLongHold to 5
- repeat with x = 12 to 47
- puppetSprite(x, 1)
- end repeat
- readLEDText()
- end
-
- on clearNHold
- repeat with x = 12 to 47
- set the castNum of sprite x to the number of member " "
- set the visible of sprite x to 1
- end repeat
- go("Set Up")
- updateStage()
- end
-
- on writeMessage
- if gIterCount >= (count(gCharToNumList) - 35) then
- set gIterCount to 0
- else
- repeat with x = 47 down to 12
- set myNum to getAt(gCharToNumList, x - 11 + gIterCount)
- set the castNum of sprite x to myNum
- set the foreColor of sprite x to getAt(gCharColorList, x - 11 + gIterCount)
- end repeat
- updateStage()
- set gIterCount to gIterCount + 1
- end if
- end
-
- on writeNStop
- if gIterCount >= (count(gCharToNumList) - 35) then
- set gIterCount to 0
- else
- if gIterCount = gStopPoint then
- if gBlinkFlag then
- go("HoldNBlink")
- else
- go("Hold")
- end if
- else
- repeat with x = 47 down to 12
- set myNum to getAt(gCharToNumList, x - 11 + gIterCount)
- set the castNum of sprite x to myNum
- set the foreColor of sprite x to getAt(gCharColorList, x - 11 + gIterCount)
- end repeat
- updateStage()
- set gIterCount to gIterCount + 1
- end if
- end if
- end
-
- on readLEDText
- getNetText("./LEDText.txt")
- startTimer()
- repeat while not NetDone()
- if the timer > 6000 then
- exit repeat
- end if
- end repeat
- if netError() <> "OK" then
- alert(string(netError()))
- else
- set newLEDValues to NetTextResult()
- if not listp(value(line 8 of newLEDValues)) then
- alert("Not a valid LED Player text file!")
- else
- set gStopPoint to value(line 1 of newLEDValues)
- set gHowLongHold to value(line 2 of newLEDValues)
- set gStopFlag to value(line 3 of newLEDValues)
- set gBlinkFlag to value(line 4 of newLEDValues)
- set gBlinkOffset to value(line 5 of newLEDValues)
- set gNumCharsToBlink to value(line 6 of newLEDValues)
- set gStopOffset to value(line 7 of newLEDValues)
- set gCharToNumList to value(line 8 of newLEDValues)
- set gCharColorList to value(line 9 of newLEDValues)
- set gURLName to line 10 of newLEDValues
- end if
- if gStopFlag then
- go("WriteNStop")
- else
- go("Write Message")
- end if
- end if
- end
-