home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global arrows, dbase
- clearGlobals()
- setControls(0)
- set dbase to new(script "databaseClass", "ShareData")
- set arrows to getspritelist("a_")
- repeat with spritenum in arrows
- set the visible of sprite spritenum to 0
- end repeat
- updateStage()
- end
-
- on stopMovie
- setvolume(128)
- end
-
- on scrollthumb minscroll, maxscroll, scrollfield
- set spritenum to the clickOn
- set thumb to the memberNum of sprite spritenum
- set thumbdown to the number of member (the name of member thumb & "Down")
- puppetSprite(spritenum, 1)
- set the memberNum of sprite spritenum to thumbdown
- updateStage()
- set curv to the mouseV
- set delta to curv - the locV of sprite spritenum
- set curlineheight to the textHeight of member scrollfield
- set lineCount to the lineCount of member scrollfield
- set totalheight to curlineheight * lineCount
- set pageHeight to the pageHeight of member scrollfield
- set remainder to totalheight - pageHeight + 1
- repeat while the mouseDown
- if totalheight <= pageHeight then
- exit repeat
- end if
- set curv to min(max(the mouseV - delta, minscroll), maxscroll)
- set the locV of sprite spritenum to curv
- updateStage()
- set the scrollTop of member scrollfield to curlineheight * integer((curv - minscroll) * remainder / ((maxscroll - minscroll) * curlineheight))
- if not soundBusy(2) then
- puppetSound(2, 0)
- puppetSound(2, "Teletype A")
- end if
- end repeat
- puppetSound(2, 0)
- set the memberNum of sprite spritenum to thumb
- updateStage()
- end
-
- on scroll direction, minscroll, maxscroll, scrollfield, thumbsymbol
- set scrollfield to string(scrollfield)
- set thumb to castspritea(string(thumbsymbol))
- set curlineheight to the textHeight of member scrollfield
- set lineCount to the lineCount of member scrollfield
- set totalheight to curlineheight * lineCount
- set pageHeight to the pageHeight of member scrollfield
- set remainder to totalheight - pageHeight
- if totalheight <= pageHeight then
- exit
- end if
- repeat while the mouseDown
- set oldpos to the scrollTop of member scrollfield
- set pos to min(max(oldpos + (curlineheight * direction), 0), remainder)
- set the scrollTop of member scrollfield to pos
- set the locV of sprite thumb to minscroll + (pos * (maxscroll - minscroll) / remainder)
- updateStage()
- if not soundBusy(2) then
- puppetSound(2, 0)
- puppetSound(2, "Teletype A")
- end if
- end repeat
- puppetSound(2, 0)
- puppetSprite(thumb, 1)
- end
-
- on showInstall
- set spritenum to castspritea("Cable")
- puppetSound(2, 0)
- puppetSound(2, "blooip")
- puppetSprite(spritenum, 1)
- repeat with index = -8 to 8
- set pos to index * 40
- set the locH of sprite spritenum to pos
- updateStage()
- end repeat
- end
-
- on hideInstall
- set spritenum to castspritea("Cable")
- if the locH of sprite spritenum <> 320 then
- exit
- end if
- puppetSound(2, 0)
- puppetSound(2, "pioolb")
- puppetSprite(spritenum, 1)
- repeat with index = 8 down to -8
- set pos to index * 40
- set the locH of sprite spritenum to pos
- updateStage()
- end repeat
- end
-
- on convertThisIssue datasrc, datatarget
- set text to the text of field datasrc
- set datalength to 8
- set delimiter to ";"
- set text to replace(text, delimiter, ",")
- set tempdata to []
- set buffer to EMPTY
- set starttemplate to [#section: EMPTY, #category: EMPTY, #name: EMPTY, #filepath: EMPTY, #description: EMPTY, #contact: EMPTY, #url: EMPTY]
- set template to [#name: EMPTY, #section: "Shareware", #category: EMPTY, #filepath: EMPTY, #image: EMPTY, #video: EMPTY, #text: EMPTY, #url: EMPTY, #description: EMPTY, #contact: EMPTY]
- set numrecords to integer(the number of lines in text / datalength)
- repeat with recnum = 0 to numrecords - 1
- set tempdata to EMPTY
- repeat with j = 0 to datalength - 1
- set curline to (recnum * datalength) + j + 1
- set linetext to line curline of text
- put linetext
- if j < (datalength - 1) then
- set tempdata to tempdata & linetext & delimiter
- end if
- end repeat
- delete char -30000 of tempdata
- set oldrec to filltemplate(starttemplate, tempdata, delimiter)
- put oldrec
- put the name of oldrec
- set rec to duplicate(template)
- repeat with index = 1 to count(starttemplate)
- set prop to getPropAt(oldrec, index)
- setProp(rec, prop, getProp(oldrec, prop))
- end repeat
- set buffer to buffer & listtotext(rec, delimiter) & RETURN
- end repeat
- delete char -30000 of buffer
- set buffer to replace(buffer, delimiter, numToChar(9))
- put buffer into field datatarget
- end
-
- on convertShareware datasrc, datatarget
- set text to the text of field datasrc
- set datalength to 6
- set delimiter to ";"
- set text to replace(text, delimiter, ",")
- set tempdata to []
- set buffer to EMPTY
- set starttemplate to [#name: EMPTY, #category: EMPTY, #url: EMPTY, #filepath: EMPTY, #description: EMPTY]
- set template to [#name: EMPTY, #section: "Shareware", #category: EMPTY, #filepath: EMPTY, #image: EMPTY, #video: EMPTY, #text: EMPTY, #url: EMPTY, #description: EMPTY, #contact: EMPTY]
- set numrecords to integer(the number of lines in text / datalength)
- repeat with recnum = 0 to numrecords - 1
- set tempdata to EMPTY
- repeat with j = 0 to datalength - 1
- set curline to (recnum * datalength) + j + 1
- set linetext to line curline of text
- put linetext
- if j < (datalength - 1) then
- set tempdata to tempdata & linetext & delimiter
- end if
- end repeat
- delete char -30000 of tempdata
- set oldrec to filltemplate(starttemplate, tempdata, delimiter)
- put oldrec
- put the name of oldrec
- set rec to duplicate(template)
- repeat with index = 1 to count(starttemplate)
- set prop to getPropAt(oldrec, index)
- setProp(rec, prop, getProp(oldrec, prop))
- end repeat
- set buffer to buffer & listtotext(rec, delimiter) & RETURN
- end repeat
- delete char -30000 of buffer
- set buffer to replace(buffer, delimiter, numToChar(9))
- put buffer into field datatarget
- 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"
- if the url of the activerec of dbase <> "n/a" then
- set urlbtn to castspritea("null")
- puppetSprite(urlbtn, 1)
- set the memberNum of sprite urlbtn to the number of member "launchURL"
- 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"
- if the url of the activerec of dbase <> "n/a" then
- set urlbtn to castspritea("launchURL")
- puppetSprite(urlbtn, 1)
- set the memberNum of sprite urlbtn to the number of member "null"
- 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 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 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(urlbtn, 0)
- puppetSprite(launchbtn, 0)
- puppetSprite(infotext, 0)
- set modality to 0
- 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 setLoadingDlgBox state
- set the visible of sprite castsprite("loaddlgbox") to state
- set the visible of sprite castsprite("loaddlg1") to state
- if state = 1 then
- set loadanimsprite to castsprite("loaddlg1")
- puppetSprite(loadanimsprite, 1)
- repeat with index = 1 to 4
- set the memberNum of sprite loadanimsprite to the number of member ("loaddlg" & string(index))
- updateStage()
- startTimer()
- repeat while the timer < 15
- end repeat
- end repeat
- end if
- end
-
- on jumpMovie movieName
- go(1, movieName)
- end
-
- on setSoundLevel whichsprite, pmin, pmax
- global gSoundLevel, gThumbPuppet
- set curpos to the locH of sprite whichsprite
- set gSoundLevel to integer((curpos - pmin) * 8 / (pmax - pmin))
- set gSoundLevel to min(max(gSoundLevel, 0), 7)
- setvolume(gSoundLevel * 255 / 7)
- set the soundLevel to gSoundLevel
- set gThumbPuppet to whichsprite
- return gSoundLevel
- end
-
- on setSoundPos whichsprite, pmin, pmax
- global gSoundLevel, gThumbPuppet
- set curpos to pmin + integer(gSoundLevel * (pmax - pmin) / 7)
- puppetSprite(whichsprite, 1)
- set the locH of sprite whichsprite to curpos
- updateStage()
- set gThumbPuppet to whichsprite
- return curpos
- end
-
- on clearThumb
- global gThumbPuppet
- puppetSprite(gThumbPuppet, 0)
- updateStage()
- end
-