home *** CD-ROM | disk | FTP | other *** search
- on setButton
- repeat with j = 4 to 9
- set the cursor of sprite j to [the number of member "Push", the number of member "PushM"]
- end repeat
- end
-
- on unSetButton
- repeat with j = 4 to 9
- set the cursor of sprite j to 0
- end repeat
- end
-
- on PressButton buttonSprite
- set puppetState to the puppet of sprite buttonSprite
- set the puppet of sprite buttonSprite to 1
- set isPressed to 1
- set relaxedCast to the castNum of sprite buttonSprite
- updateStage()
- repeat while the mouseDown
- set isPressed to rollOver(buttonSprite)
- if the ink of sprite buttonSprite = 3 <> isPressed then
- if isPressed then
- else
- end if
- updateStage()
- end if
- end repeat
- set the puppet of sprite buttonSprite to puppetState
- return isPressed
- end
-
- on IsPressButton buttonSprite
- set puppetState to the puppet of sprite buttonSprite
- set the puppet of sprite buttonSprite to 1
- set isPressed to 1
- set relaxedCast to the castNum of sprite buttonSprite
- updateStage()
- repeat while the mouseDown
- set isPressed to rollOver(buttonSprite)
- if the castNum of sprite buttonSprite = (relaxedCast + 1) <> isPressed then
- if isPressed then
- set the castNum of sprite buttonSprite to relaxedCast + 1
- else
- set the castNum of sprite buttonSprite to relaxedCast
- end if
- updateStage()
- end if
- end repeat
- set the puppet of sprite buttonSprite to puppetState
- return isPressed
- end
-
- on runApp
- global pathName, AppName
- set tpath to getBack(the pathName) & pathName
- if the machineType = 256 then
- set tpath to tpath & "\"
- else
- set tpath to tpath & ":"
- end if
- repeat with i = 1 to the maxinteger
- set n to getNthFileNameInFolder(tpath, i)
- if (n = EMPTY) or (n = AppName) then
- exit repeat
- end if
- end repeat
- if the machineType = 256 then
- set AppName to tpath & AppName
- else
- set AppName to tpath & AppName
- end if
- if n = EMPTY then
- alert("In order to run this application, it must be installed!")
- exit
- else
- if the machineType = 256 then
- setpath(tpath)
- end if
- if AppName contains ".DIR" then
- go(1, AppName)
- dontPassEvent()
- abort()
- else
- open(AppName)
- dontPassEvent()
- if the machineType <> 256 then
- wait(60 * 1)
- end if
- quit()
- end if
- end if
- end
-
- on getBack pathName
- if the machineType = 256 then
- set delim to "\"
- else
- set delim to ":"
- end if
- set max to the number of chars in pathName
- repeat with i = max - 1 down to 1
- set n to char i of pathName
- if n = delim then
- delete char i + 1 to max of pathName
- exit repeat
- end if
- end repeat
- return pathName
- end
-
- on wait n
- startTimer()
- repeat while the timer < n
- end repeat
- end
-
- on settimeout
- set the timeoutLength to 2 * 60 * 60
- set the timeoutMouse to 1
- set the timeoutKeyDown to 1
- set the timeoutScript to "timeoutProcedure"
- end
-
- on timeoutProcedure
- unSetButton()
- startMovie()
- go(1)
- end
-