home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global knob, dbase, modality
- setControls(0)
- set dbase to new(script "databaseClass", "databaseText")
- set knob to new(script "knobClass", "knob", count(getsections(dbase)), "knobaction")
- showfiles(1, 1)
- set the scrollTop of member "files" to 0
- set the scrollTop of member "articles" to 0
- resetThumb("filethumb")
- resetThumb("articlethumb")
- set the visible of sprite castspritea("installbtn") to 0
- setvolume(15)
- set modality to 0
- end
-
- on knobaction whichstate
- puppetSound(2, 0)
- puppetSound(2, "switch")
- showfiles(whichstate, 1)
- cyclelights(3)
- end
-
- on cyclelights numtimes
- repeat with whichcycle = 1 to numtimes
- if not soundBusy(2) then
- puppetSound(2, 0)
- puppetSound(2, "Visor Hum Loop")
- end if
- repeat with index = 1 to 3
- startTimer()
- repeat with query = 1 to 3
- set the visible of sprite castsprite("light" & string(query)) to query = index
- updateStage()
- end repeat
- repeat while the timer < 6
- if the mouseDown then
- puppetSound(2, 0)
- repeat with index = 1 to 3
- set the visible of sprite castsprite("light" & string(index)) to 0
- updateStage()
- end repeat
- puppetSound(2, 0)
- exit repeat
- end if
- end repeat
- end repeat
- repeat with index = 1 to 3
- set the visible of sprite castsprite("light" & string(index)) to 0
- updateStage()
- end repeat
- end repeat
- puppetSound(2, 0)
- end
-
- on showfiles section, article
- global dbase
- set headerlist to getsections(dbase)
- if not voidp(section) then
- set the activesection of dbase to getAt(headerlist, section)
- end if
- put the activesection of dbase into field "header"
- set articlelist to getCategories(dbase)
- if not voidp(article) then
- set the activecategory of dbase to getAt(articlelist, article)
- end if
- set buffer to the activesection of dbase & RETURN
- set buffer to buffer & listtotext(articlelist, RETURN & RETURN)
- if buffer <> the text of field "articles" then
- set the textFont of line 1 of field "articles" to "Geneva"
- put buffer into field "articles"
- set the textFont of line 1 of field "articles" to "Chicago"
- end if
- set filelist to getrecords(dbase)
- set buffer to the activecategory of dbase & RETURN
- set buffer to buffer & listtotext(filelist, RETURN)
- if buffer <> the text of field "files" then
- set the textFont of line 1 of field "files" to "Geneva"
- put buffer into field "files"
- set the textFont of line 1 of field "files" to "Chicago"
- end if
- set the activerec of dbase to getrecord(dbase, getAt(filelist, 1))
- end
-
- on idle
- global gvoxlist
- if random(10000) = 500 then
- if not listp(gvoxlist) then
- set gvoxlist to []
- end if
- if count(gvoxlist) = 0 then
- repeat with index = 1 to 6
- add(gvoxlist, index)
- end repeat
- repeat with index = 1 to 6
- set r to random(6)
- set t to getAt(gvoxlist, r)
- setAt(gvoxlist, r, getAt(gvoxlist, index))
- setAt(gvoxlist, index, t)
- end repeat
- end if
- set curvox to getAt(gvoxlist, 1)
- deleteAt(gvoxlist, 1)
- set the visible of sprite castsprite("speaker") to 1
- updateStage()
- cyclelights(1)
- puppetSound(3, 0)
- puppetSound(3, "Vox" & string(curvox))
- repeat while soundBusy(3)
- set the visible of sprite castsprite("speaker") to not (the visible of sprite castsprite("speaker"))
- updateStage()
- cyclelights(1)
- if the mouseDown then
- exit repeat
- end if
- end repeat
- set the visible of sprite castsprite("speaker") to 0
- updateStage()
- end if
- end
-
- on setControls state
- puppetSound(2, 0)
- if state then
- puppetSound(2, "blooip")
- else
- puppetSound(2, "pioolb")
- end if
- set btnlist to ["controls", "backbtn", "menubtn", "infobtn", "quitbtn", "audiothumb"]
- repeat with ctrl in btnlist
- set the visible of sprite castsprite(ctrl) to state
- end repeat
- end
-
- on showLaunchDlg
- global dbase, modality
- puppetSound(2, 0)
- puppetSound(2, "blooip")
- set dlgsprite to castspritea("null")
- puppetSprite(dlgsprite, 1)
- set the memberNum of sprite dlgsprite to the number of member "Warning"
- set urlbtn to castspritea("null")
- puppetSprite(urlbtn, 1)
- set the memberNum of sprite urlbtn to the number of member "launchURL"
- if the url of the activerec of dbase <> "n/a" then
- set the visible of sprite urlbtn to 0
- end if
- set launchbtn to castspritea("null")
- puppetSprite(launchbtn, 1)
- set the memberNum of sprite launchbtn to the number of member "InstallAppBtn"
- set infotext to castspritea("null")
- puppetSprite(infotext, 1)
- set the memberNum of sprite infotext to the number of member "ContactInfo"
- set rec to the activerec of dbase
- set the text of field "ContactInfo" to outsafeput(the contact of rec)
- set the loc of sprite infotext to point(161, 247)
- updateStage()
- set modality to 1
- end
-
- on HideLaunchDlg
- global dbase, modality
- set dlgsprite to castspritea("Warning")
- puppetSprite(dlgsprite, 1)
- set the memberNum of sprite dlgsprite to the number of member "null"
- set urlbtn to castspritea("launchURL")
- puppetSprite(urlbtn, 1)
- set the memberNum of sprite urlbtn to the number of member "null"
- if the url of the activerec of dbase <> "n/a" then
- set the visible of sprite urlbtn to 1
- end if
- set launchbtn to castspritea("InstallAppBtn")
- puppetSprite(launchbtn, 1)
- set the memberNum of sprite launchbtn to the number of member "null"
- set infotext to castspritea("ContactInfo")
- puppetSprite(infotext, 1)
- set the memberNum of sprite infotext to the number of member "null"
- set the text of field "ContactInfo" to " "
- updateStage()
- puppetSprite(dlgsprite, 0)
- puppetSprite(urlbtn, 0)
- puppetSprite(launchbtn, 0)
- puppetSprite(infotext, 0)
- set modality to 0
- end
-
- on launchURL
- puppetSound(2, 0)
- puppetSound(2, "launchURLSound")
- end
-
- on launchApp myfilepath
- global dbase
- puppetSound(2, 0)
- puppetSound(2, "launchAppSound")
- if castspritea("password") then
- HidePasswordDlg()
- if the text of member "passwordtext" = "frag1le" then
- loadfile(dbase)
- end if
- else
- open(myfilepath)
- end if
- end
-
- on ShowPasswordDlg
- global dbase, modality
- puppetSound(2, 0)
- puppetSound(2, "blooip")
- set dlgsprite to castspritea("null")
- puppetSprite(dlgsprite, 1)
- set the memberNum of sprite dlgsprite to the number of member "Password"
- set urlbtn to castspritea("null")
- puppetSprite(urlbtn, 1)
- set the memberNum of sprite urlbtn to the number of member "launchURL"
- set the visible of sprite urlbtn to 0
- set launchbtn to castspritea("null")
- puppetSprite(launchbtn, 1)
- set the memberNum of sprite launchbtn to the number of member "InstallAppBtn"
- set infotext to castspritea("null")
- puppetSprite(infotext, 1)
- set the memberNum of sprite infotext to the number of member "passwordtext"
- set rec to the activerec of dbase
- set the text of field "passwordtext" to outsafeput(the contact of rec)
- set the loc of sprite infotext to point(161, 247)
- updateStage()
- set modality to 1
- end
-
- on HidePasswordDlg
- global modality
- set dlgsprite to castspritea("Password")
- puppetSprite(dlgsprite, 1)
- set the memberNum of sprite dlgsprite to the number of member "null"
- set urlbtn to castspritea("launchURL")
- puppetSprite(urlbtn, 1)
- set the memberNum of sprite urlbtn to the number of member "null"
- set the visible of sprite urlbtn to 1
- set launchbtn to castspritea("InstallAppBtn")
- puppetSprite(launchbtn, 1)
- set the memberNum of sprite launchbtn to the number of member "null"
- set infotext to castspritea("passwordtext")
- puppetSprite(infotext, 1)
- set the memberNum of sprite infotext to the number of member "null"
- set the text of field "ContactInfo" to " "
- updateStage()
- puppetSprite(dlgsprite, 0)
- puppetSprite(launchbtn, 0)
- puppetSprite(infotext, 0)
- set modality to 0
- end
-