home *** CD-ROM | disk | FTP | other *** search
- global seed, noVideo, database, menuIndex, buttonIndex, fd, submenuIndex, currentAsset, Tile, videoIndex, firstTime, bannerIndex, bannerList, systemSpecs, vidLoaded, dbLoaded
-
- on prepareMovie me
- clearGlobals()
- baRegister("David Cole", 2833894)
- if the platform contains "Windows" then
- fd = "\"
- acrobatReaderPath = baFindApp("PDF")
- else
- fd = ":"
- acrobatReaderPath = baFindApp("CARO")
- end if
- firstTime = 1
- videoIndex = 0
- menuIndex = 0
- submenuIndex = 0
- buttonIndex = 0
- currentAsset = EMPTY
- dbLoaded = 0
- vidLoaded = 0
- Tile = 0
- noVideo = 0
- bannerIndex = 1
- bannerList = [:]
- set the soundKeepDevice to 0
- member(58).fileName = the pathname & fd & "assets" & fd & "video" & fd & "placeholder.mov"
- member(167).fileName = the pathname & fd & "assets" & fd & "video" & fd & "placeholder.mov"
- member(53).fileName = the pathname & fd & "assets" & fd & "placeholder.jpg"
- member(141).fileName = the pathname & fd & "assets" & fd & "placeholder.jpg"
- member(11).fileName = the pathname & fd & "assets" & fd & "banner_placeholder.gif"
- member(80).fileName = EMPTY
- getSystemSpecs()
- member("textImporter").fileName = the pathname & "assets" & fd & "data" & fd & "content.txt"
- seed = value(member("textImporter").text)
- getBanners()
- end
-
- on stopMovie me
- go("black")
- updateStage()
- member(58).fileName = the pathname & fd & "assets" & fd & "video" & fd & "placeholder.mov"
- member(167).fileName = the pathname & fd & "assets" & fd & "video" & fd & "placeholder.mov"
- member(53).fileName = the pathname & fd & "assets" & fd & "placeholder.jpg"
- member(141).fileName = the pathname & fd & "assets" & fd & "placeholder.jpg"
- member(11).fileName = the pathname & fd & "assets" & fd & "banner_placeholder.gif"
- member(80).fileName = EMPTY
- end
-
- on parseForSpecs targetMem
- o = offset("{specs}", member(targetMem).text)
- if o then
- member(targetMem).char[o..o + 6] = systemSpecs
- end if
- end
-
- on getRoot txt
- o = offset("_thumbnail", txt)
- if o = 0 then
- return txt
- else
- return txt.char[1..o - 1]
- end if
- end
-
- on stripExtension txt
- a = the itemDelimiter
- the itemDelimiter = "."
- s = txt.item[1]
- repeat with i = 2 to txt.item.count - 1
- s = s & "." & txt.item[i]
- end repeat
- the itemDelimiter = a
- return s
- end
-
- on stripFolder txt, fDelimiter
- a = the itemDelimiter
- the itemDelimiter = fDelimiter
- if txt.char[txt.char.count] = fDelimiter then
- delete char txt.char.count of txt
- end if
- s = txt.item[1..txt.item.count - 1]
- the itemDelimiter = a
- return s
- end
-
- on parseText txt
- a = EMPTY
- repeat with i = 1 to txt.char.count
- if txt.char[i] = RETURN then
- a = a & QUOTE & "&RETURN&" & QUOTE
- next repeat
- end if
- a = a & txt.char[i]
- end repeat
- return a
- end
-
- on parseForURL targetMem
- repeat with j = 1 to member(targetMem).text.word.count
- if offset("{link:", member(targetMem).text.word[j]) then
- embedLink(targetMem, j)
- end if
- end repeat
- repeat with j = 1 to member(targetMem).text.word.count
- if offset("http://", member(targetMem).text.word[j]) = 1 then
- theword = member(targetMem).text.word[j]
- if (theword.char[theword.char.count] = ".") or (theword.char[theword.char.count] = ")") then
- member(targetMem).word[j].hyperlink = theword.char[1..theword.char.count - 1]
- else
- member(targetMem).word[j].hyperlink = member(targetMem).text.word[j]
- end if
- member(targetMem).word[j].color = rgb(200, 200, 255)
- next repeat
- end if
- if offset("www.", member(targetMem).text.word[j]) = 1 then
- theword = member(targetMem).text.word[j]
- if (theword.char[theword.char.count] = ".") or (theword.char[theword.char.count] = ")") then
- member(targetMem).word[j].hyperlink = "http://" & theword.char[1..theword.char.count - 1]
- else
- member(targetMem).word[j].hyperlink = "http://" & member(targetMem).text.word[j]
- end if
- member(targetMem).word[j].color = rgb(200, 200, 255)
- end if
- end repeat
- end
-
- on embedLink targetMem, w
- wordCount = 1
- ww = w
- str = EMPTY
- myURL = EMPTY
- hitLeftBracket = 0
- hitColon = 0
- hitDivider = 0
- hitRightBracket = 0
- failed = 0
- repeat while hitDivider = 0
- repeat with i = 1 to member(targetMem).text.word[ww].char.count
- if (member(targetMem).text.word[ww].char[i] = ":") and (hitColon = 0) then
- hitColon = 1
- next repeat
- end if
- if (hitColon = 1) and (hitDivider = 0) then
- if member(targetMem).text.word[ww].char[i] = "|" then
- hitDivider = 1
- exit repeat
- next repeat
- end if
- str = str & member(targetMem).text.word[ww].char[i]
- end if
- end repeat
- if hitDivider = 0 then
- ww = ww + 1
- str = str & " "
- if member(targetMem).text.word.count < ww then
- failed = 1
- exit repeat
- end if
- wordCount = wordCount + 1
- end if
- end repeat
- if failed = 0 then
- repeat with k = i + 1 to member(targetMem).text.word[ww].char.count
- if member(targetMem).text.word[ww].char[k] = "}" then
- hitRightBracket = 1
- exit repeat
- next repeat
- end if
- myURL = myURL & member(targetMem).text.word[ww].char[k]
- end repeat
- if (hitRightBracket = 0) and (k = member(targetMem).text.word[ww].char.count) then
- failed = 1
- end if
- end if
- if failed = 0 then
- put str into (member targetMem).word[w..ww]
- member(targetMem).word[w..ww].hyperlink = myURL
- member(targetMem).word[w..ww].color = rgb(200, 200, 255)
- end if
- end
-
- on refreshStates
- repeat with i = 110 to 120
- if sprite(i).visible = 1 then
- if menuIndex <> 0 then
- if findPos(seed[#mainmenu][menuIndex][#submenu][sprite(i).buttonNumber + buttonIndex], #selected) then
- if seed[#mainmenu][menuIndex][#submenu][sprite(i).buttonNumber + buttonIndex][#selected] = 1 then
- sprite(i).member = sprite(i).memDn
- sprite(i + 1).foreColor = 255
- else
- sprite(i).member = sprite(i).mem
- sprite(i + 1).foreColor = 0
- end if
- else
- seed[#mainmenu][menuIndex][#submenu][sprite(i).buttonNumber + buttonIndex][#selected] = 0
- end if
- else
- sprite(i).member = sprite(i).mem
- sprite(i + 1).foreColor = 0
- end if
- end if
- i = i + 1
- end repeat
- repeat with i = 127 to 143
- if sprite(i).visible = 1 then
- if menuIndex <> 0 then
- if findPos(seed[#mainmenu][menuIndex][#submenu][sprite(i).buttonNumber + buttonIndex], #selected) then
- if seed[#mainmenu][menuIndex][#submenu][sprite(i).buttonNumber + buttonIndex][#selected] = 1 then
- sprite(i).member = sprite(i).memDn
- sprite(i + 1).foreColor = 255
- else
- sprite(i).member = sprite(i).mem
- sprite(i + 1).foreColor = 0
- end if
- else
- seed[#mainmenu][menuIndex][#submenu][sprite(i).buttonNumber + buttonIndex][#selected] = 0
- end if
- else
- sprite(i).member = sprite(i).mem
- sprite(i + 1).foreColor = 0
- end if
- end if
- i = i + 1
- end repeat
- end
-
- on getSystemSpecs
- systemSpecs = RETURN & "Your System Configuration" & RETURN & " CPU: "
- m = baCpuInfo("model")
- v = baCpuInfo("vendor")
- cpu = EMPTY
- if v contains "Intel" then
- v = "Intel"
- case baCpuInfo("type") of
- 4:
- cpu = "486"
- 5:
- cpu = "Pentium"
- 6:
- case m of
- 1:
- cpu = "Pentium Pro"
- 3, 5:
- cpu = "Pentium II"
- 6:
- cpu = "Celeron"
- 7, 8, 11:
- cpu = "Pentium III"
- 8, 10:
- cpu = "Pentium III Xeon"
- otherwise:
- cpu = "Pentium"
- end case
- 15:
- cpu = "Pentium 4+"
- otherwise:
- cpu = EMPTY
- end case
- else
- if v contains "AMD" then
- v = "AMD"
- case baCpuInfo("type") of
- 5:
- case baCpuInfo("type") of
- 0, 1, 2, 3, 4, 5:
- cpu = "K5"
- 6, 7:
- cpu = "K6"
- 8:
- cpu = "K6-II"
- 9:
- cpu = "K6-III"
- otherwise:
- cpu = EMPTY
- end case
- 6:
- cpu = "K7 Athlon"
- otherwise:
- cpu = EMPTY
- end case
- else
- cpu = EMPTY
- end if
- end if
- speed = baCpuInfo("speed")
- put "." after char 1 of speed
- systemSpecs = systemSpecs & v & " " & cpu & " " & speed & "Ghz" & RETURN & " RAM: "
- m = baMemoryInfo("ram") / 1024000
- l = baDiskList()
- pd = EMPTY
- s = 0
- repeat with i in l
- if baDiskInfo(i, "type") = "Hard" then
- ss = baDiskInfo(i, "free")
- if ss > s then
- s = ss
- pd = i
- end if
- end if
- end repeat
- if (pd = EMPTY) or (s = 0) then
- systemSpecs = systemSpecs & m & "MB" & RETURN
- else
- systemSpecs = systemSpecs & m & "MB" & RETURN & " Free Disk: (" & pd & ") " & baDiskInfo(pd, "free") / 1024000 & "/" & baDiskInfo(pd, "size") / 1024000 & "GB" & RETURN
- end if
- sys = _system.environmentPropList
- systemSpecs = systemSpecs & " OS: " & sys[#osVersion].item[1] & RETURN
- systemSpecs = systemSpecs & " DirectX Version: " & sys[#directXVersion] & RETURN
- if sys[#internetConnected] = #online then
- systemSpecs = systemSpecs & " Net Connection Detected" & RETURN
- else
- systemSpecs = systemSpecs & " No Net Connection Detected" & RETURN
- end if
- end
-
- on textify t
- d = the itemDelimiter
- the itemDelimiter = "."
- tt = EMPTY
- repeat with j = 1 to t.item.count - 1
- tt = tt & t.item[j] & "."
- end repeat
- tt = tt & "txt"
- the itemDelimiter = d
- return tt
- end
-
- on parsePath txt
- a = the itemDelimiter
- the itemDelimiter = "/"
- s = txt.item[1]
- repeat with i = 2 to txt.item.count
- s = s & fd & txt.item[i]
- end repeat
- the itemDelimiter = a
- return s
- end
-
- on openDoc d
- result = baOpenFile(d, "normal")
- if the platform contains "Windows" then
- win = baWindowList(EMPTY, "Acrobat", 0)
- if win <> [] then
- baActivateWindow(win[1])
- end if
- end if
- if result < 32 then
- case result of
- 2:
- alert("The file could not be found: " & d)
- 3:
- alert("The path could not be found: " & d)
- 31:
- alert("The application could not be found: " & d)
- otherwise:
- alert("Error opening file: " & result & RETURN & d)
- end case
- end if
- end
-
- on getBanners
- if menuIndex = 0 then
- if findPos(seed, #banners) <> VOID then
- if bannerList <> seed[#banners] then
- bannerList = seed[#banners]
- bannerIndex = 1
- sendAllSprites(#updateBanners)
- end if
- else
- bannerList = []
- end if
- else
- if submenuIndex = 0 then
- if findPos(seed[#mainmenu][menuIndex], #banners) <> VOID then
- bannerList = seed[#mainmenu][menuIndex][#banners]
- bannerIndex = 1
- sendAllSprites(#updateBanners)
- end if
- else
- if findPos(seed[#mainmenu][menuIndex][#submenu][submenuIndex], #banners) <> VOID then
- bannerList = seed[#mainmenu][menuIndex][#submenu][submenuIndex][#banners]
- bannerIndex = 1
- sendAllSprites(#updateBanners)
- end if
- end if
- end if
- end
-