home *** CD-ROM | disk | FTP | other *** search
Wrap
global interfaceMgr, paletteMgr, recordMgr, sndLPRecMgr, sndFXRecMgr, animRecMgr, bgdRecMgr, bgdFXRecMgr, fgdFXRecMgr, playbackMgr, layerMgr, listMgr, appMgr, editMgr, fileMgr, stackMgr, currentFrame, simpdataPath, simpsonsPath, dlogdataPath, toondataPath, exportPath, playBackMode, savedToonDataIndex, PCflag, statusWindow, alertWindow, thePlayerCartoonName on startMovie cursor(4) set the mouseDownScript to EMPTY set the keyDownScript to EMPTY set the exitLock to 1 set currentFrame to 1 createObjects() if playBackMode = #ReturnFromExport then deleteXTMPLworkfiles(fileMgr) set theMessage to "The exported cartoon named" && QUOTE & thePlayerCartoonName & QUOTE && "is now in your EXPORT folder." set theAlertBoxType to #OK if savedToonDataIndex <> 0 then set actionItem to "readToonData(fileMgr, savedToonDataIndex)" else set actionItem to "nothing" set playBackMode to #NIL end if showTheAlertBox(theMessage, theAlertBoxType, "nothing", "nothing", actionItem) else if playBackMode = #BEGIN then if soundBusy(1) then set oldVolume to the volume of sound 1 repeat while the volume of sound 1 > 0 startTimer() set the volume of sound 1 to the volume of sound 1 - 8 repeat while the timer < 6 end repeat end repeat puppetSound(1, 0) set the volume of sound 1 to oldVolume end if set the ink of sprite 46 to 0 set the ink of sprite 47 to 0 set the ink of sprite 48 to 0 set the castNum of sprite 46 to the number of cast "icon.place holder" set the castNum of sprite 47 to the number of cast "icon.place holder" set the castNum of sprite 48 to the number of cast "icon.place holder" set the loc of sprite 46 to point(-985, 202) set the loc of sprite 47 to point(-985, 202) set the loc of sprite 48 to point(-985, 202) unLoad() preLoad(10, 10) go("MAIN") end if end if cursor(-1) updateStage() end on stopMovie put "Untitled" into field "filenamefield" put EMPTY into field "loopstatusfield" put EMPTY into field "soundstatusfield" end on createObjects set interfaceMgr to birth(script 2) set paletteMgr to birth(script 3) set recordMgr to birth(script 4) set playbackMgr to birth(script 5) set listMgr to birth(script 6) set layerMgr to birth(script 7) set appMgr to birth(script 8) set editMgr to birth(script 9) set fileMgr to birth(script 10) set stackMgr to birth(script 11) set animRecMgr to birth(script 12) set bgdRecMgr to birth(script 13) set bgdFXRecMgr to birth(script 14) set fgdFXRecMgr to birth(script 15) set sndLPRecMgr to birth(script 16) set sndFXRecMgr to birth(script 17) end on puppetSprites start, finish, theState repeat with theSpr = start to finish puppetSprite(theSpr, theState) end repeat end on copyList sourceList if not listp(sourceList) then return [] end if return value(string(sourceList)) end on incrementFrame set currentFrame to currentFrame + 1 end on decrementFrame set currentFrame to currentFrame - 1 end on resetFrameCounter set currentFrame to 1 end on showStatusBar theMessage cursor(4) if objectp(statusWindow) then forget(statusWindow) end if set statusWindow to window "status" set h to the stageLeft + 105 set v to the stageTop + 100 set the rect of statusWindow to rect(h, v, h + 416, v + 101) set the fileName of statusWindow to dlogdataPath & "status" set the windowType of statusWindow to 2 set the modal of statusWindow to 1 tell statusWindow displayMessage(theMessage) end tell open(statusWindow) end on updateStatusBar thePercentage if objectp(statusWindow) then cursor(4) tell statusWindow update(thePercentage) end tell if thePercentage = 100 then set the visible of statusWindow to 0 updateStage() close(statusWindow) forget(statusWindow) end if end if end on showTheAlertBox theMessage, theAlertBoxType, action1, action2, action3 if objectp(alertWindow) then forget(alertWindow) end if set alertWindow to window "alert" set h to the stageLeft + 105 set v to the stageTop + 100 set the rect of alertWindow to rect(h, v, h + 416, v + 164) set the fileName of alertWindow to dlogdataPath & "alert" set the windowType of alertWindow to 2 set the modal of alertWindow to 1 tell alertWindow show(theMessage, theAlertBoxType, action1, action2, action3) end tell open(alertWindow) end on handleAlertBox theCommand set the visible of alertWindow to 0 updateStage() close(alertWindow) forget(alertWindow) do(theCommand) end on checkString theCheckString global fileObj set error to 0 if not listp(theCheckString) then set error to 1 set theMessage to "Sorry you require Big Top's Cartoon Toolbox Starring Felix the Cat to play this cartoon." set theAlertBoxType to #OK set btn2script to "nothing" set btn3script to "fileObj( mDispose )" else if count(theCheckString) <> 3 then set error to 1 set theMessage to "Sorry cannot import, this is an old version of toondata." set theAlertBoxType to #OK set btn2script to "nothing" set btn3script to "fileObj( mDispose )" else if getAt(theCheckString, 1) <> 2 then set error to 1 set theMessage to "Sorry you require Simpsons Cartoon Studio to play this cartoon." set theAlertBoxType to #OK set btn2script to "nothing" set btn3script to "fileObj( mDispose )" else if getAt(theCheckString, 2) <> 1 then set error to 1 set theMessage to "This cartoon was made with a foreign language or updated version of the Cartoon Studio. The cartoon will not play exactly as written: Do yo wish to continue?" set theAlertBoxType to #cancel_ok set btn2script to "fileObj( mDispose )" set btn3script to "doImportToondata2(fileMgr)" else if getAt(theCheckString, 3) = 1 then set error to 1 set theMessage to "This cartoon contains customized content and will not play exactly as originally written. Do you wish to continue?" set theAlertBoxType to #cancel_ok set btn2script to "fileObj( mDispose )" set btn3script to "doImportToondata2(fileMgr)" end if end if end if end if end if if error then showTheAlertBox(theMessage, theAlertBoxType, "nothing", btn2script, btn3script) else return 1 end if end