home *** CD-ROM | disk | FTP | other *** search
/ MacAddict 24 / MacAddict_024_1998_08.iso / Media / Software.dxr / Internal_1.ls < prev    next >
Encoding:
Text File  |  1998-06-04  |  3.4 KB  |  144 lines

  1. on startMovie
  2.   global DBfact, TBfact, gDb, gTB, gBrowser
  3.   new(script "BrowserClass", "htmlsource")
  4.   openXLib(the pathName & "xtras:FileIOXtraFat")
  5.   openXLib(the pathName & "xtras:v12-dbe")
  6.   openXLib(the pathName & "xtras:v12table")
  7.   set gOSDir to getOSDirectory()
  8.   put gOSDir & "Preferences:" into field "OSPath"
  9.   put gOSDir & "Preferences:Browser" into field "ThePath"
  10.   loadBrowser()
  11.   getSoftData()
  12.   if the optionDown = 1 then
  13.     go("import")
  14.   end if
  15.   put "Apple" into field "fld"
  16.   repeat with h = 3 to 5
  17.     set the visible of sprite h to 0
  18.   end repeat
  19.   repeat with i = 11 to 18
  20.     set the visible of sprite i to 0
  21.   end repeat
  22.   set the visible of sprite 25 to 0
  23.   set the visible of sprite 26 to 0
  24. end
  25.  
  26. on restartMe
  27.   global DBfact, TBfact
  28.   clearGlobals()
  29.   openXLib(the moviePath & "xtras:V12Dbe")
  30.   openXLib(the moviePath & "xtras:V12Table")
  31.   set DBfact to xtra("V12Dbe")
  32.   set TBfact to xtra("V12Table")
  33.   set the visible of sprite 25 to 0
  34.   put "Communication" into field "fld"
  35. end
  36.  
  37. on ClearMe
  38.   global gTB, gDb
  39.   set gTB to 0
  40.   set gDb to 0
  41.   go("begin")
  42. end
  43.  
  44. on doPopMenu spriteNum, h, v
  45.   set the visible of sprite spriteNum to 1
  46.   set the locH of sprite spriteNum to h
  47.   set the locV of sprite spriteNum to v
  48.   updateStage()
  49.   set cNum to the castNum of sprite spriteNum
  50.   set lastSelection to 0
  51.   set len to the number of lines in field cNum
  52.   repeat while the stillDown
  53.     set mc to the mouseLine
  54.     if (0 < mc) and (mc <= len) and rollOver(spriteNum) then
  55.       if mc <> lastSelection then
  56.         set lastSelection to mc
  57.         hilite line mc of field cNum
  58.         updateStage()
  59.       end if
  60.       next repeat
  61.     end if
  62.     if mc <> lastSelection then
  63.       set lastSelection to -1
  64.       hilite line len + 1 of field cNum
  65.       updateStage()
  66.     end if
  67.   end repeat
  68.   set the visible of sprite spriteNum to 0
  69.   set the visible of sprite 25 to 0
  70.   updateStage()
  71.   if line lastSelection of field cNum <> EMPTY then
  72.     return lastSelection
  73.   else
  74.     return -1
  75.   end if
  76. end
  77.  
  78. on setVolumePos
  79.   case the soundLevel of
  80.     7:
  81.       set the locH of sprite 18 to 514
  82.     6:
  83.       set the locH of sprite 18 to 524
  84.     5:
  85.       set the locH of sprite 18 to 538
  86.     4:
  87.       set the locH of sprite 18 to 552
  88.     3:
  89.       set the locH of sprite 18 to 566
  90.     2:
  91.       set the locH of sprite 18 to 580
  92.     1:
  93.       set the locH of sprite 18 to 593
  94.     0:
  95.       set the locH of sprite 18 to 606
  96.   end case
  97. end
  98.  
  99. on setVolume
  100.   if the locH of sprite 18 <= 514 then
  101.     set the soundLevel to 7
  102.   end if
  103.   if the locH of sprite 18 > 514 then
  104.     set the soundLevel to 6
  105.   end if
  106.   if the locH of sprite 18 > 524 then
  107.     set the soundLevel to 5
  108.   end if
  109.   if the locH of sprite 18 > 538 then
  110.     set the soundLevel to 4
  111.   end if
  112.   if the locH of sprite 18 > 552 then
  113.     set the soundLevel to 3
  114.   end if
  115.   if the locH of sprite 18 > 566 then
  116.     set the soundLevel to 2
  117.   end if
  118.   if the locH of sprite 18 > 580 then
  119.     set the soundLevel to 1
  120.   end if
  121.   if the locH of sprite 18 > 593 then
  122.     set the soundLevel to 0
  123.   end if
  124. end
  125.  
  126. on getSoftData
  127.   global myfile
  128.   if the machineType = 256 then
  129.     set i to the moviePath & "Images\categories.dat"
  130.   else
  131.     set i to the moviePath & "images:categories.dat"
  132.   end if
  133.   set DaPath to i
  134.   if objectp(myfile) then
  135.     set myfile to 0
  136.   end if
  137.   set myfile to new(xtra("fileio"))
  138.   openFile(myfile, DaPath, 1)
  139.   set Adinfo to readFile(myfile)
  140.   put Adinfo into field "fields"
  141.   closeFile(myfile)
  142.   set myfile to 0
  143. end
  144.