home *** CD-ROM | disk | FTP | other *** search
/ Pro One: Netcracker Netscape Navigator / ProOne: Netcracker Netscape Navigator.iso / pc / nc / nc_mm005.geo / 00027_GENERAL BTNS.ls < prev    next >
Encoding:
Text File  |  1997-03-19  |  11.0 KB  |  403 lines

  1. on startMovie
  2.   global WasIn_MM010, WasIN_MM020, WasIN_MM030, WasIN_MM040
  3.   set WasIn_MM010 to 1
  4.   set WasIN_MM020 to 1
  5.   set WasIN_MM030 to 1
  6.   set WasIN_MM040 to 1
  7.   LoadIndexData()
  8.   set the textHeight of field "NamesList" to 14
  9.   initSpriteNums()
  10. end
  11.  
  12. on LoadIndexData
  13.   global HDfilePath, CDfilePath, PCDEL, IndexPointer, IndexList, NumOfUsers
  14.   if objectp(IndexPointer) then
  15.     IndexPointer(mdispose)
  16.   end if
  17.   set IndexPointer to FileIO(mnew, "read", HDfilePath & "index.txt")
  18.   if objectp(IndexPointer) then
  19.     set IndexData to IndexPointer(mReadFile)
  20.     if objectp(IndexPointer) then
  21.       IndexPointer(mdispose)
  22.     end if
  23.     set save to the itemDelimiter
  24.     set the itemDelimiter to "@"
  25.     put item 1 of IndexData into field "complete"
  26.     if line 1 of field "complete" = EMPTY then
  27.       delete line 1 of field "complete"
  28.     end if
  29.     set IndexList to value(string(item 2 of IndexData))
  30.     set NumOfUsers to value(item 3 of IndexData)
  31.     set the itemDelimiter to save
  32.   else
  33.     set NumOfUsers to 0
  34.     put " " into field "complete"
  35.     set IndexList to [#null_l: "xx"]
  36.     if objectp(IndexPointer) then
  37.       IndexPointer(mdispose)
  38.     end if
  39.     set save to the itemDelimiter
  40.     set the itemDelimiter to "@"
  41.     put field "complete" into item 1 of theInfo
  42.     put IndexList into item 2 of theInfo
  43.     put NumOfUsers into item 3 of theInfo
  44.     set the itemDelimiter to save
  45.     if objectp(IndexPointer) then
  46.       IndexPointer(mdispose)
  47.     end if
  48.     set IndexData to string(theInfo)
  49.     set IndexPointer to FileIO(mnew, "write", HDfilePath & "index.txt")
  50.     IndexPointer(mWriteString, IndexData)
  51.     if objectp(IndexPointer) then
  52.       IndexPointer(mdispose)
  53.     end if
  54.   end if
  55. end
  56.  
  57. on LoadUSERData
  58.   global HDfilePath, CDfilePath, PCDEL, FilePointer, CurrentFile, IndexList, NumOfUsers, IndexPointer, WasIn_MM010, WasIN_MM020, WasIN_MM030, WasIN_MM040
  59.   set_UserProp()
  60.   if get_UserExist(get_UserName()) then
  61.     set fileName to getaProp(IndexList, value("#" & get_UserProp()))
  62.     UpdateUserGlobals(fileName)
  63.   else
  64.     set WasIn_MM010 to 0
  65.     set WasIN_MM020 to 0
  66.     set WasIN_MM030 to 0
  67.     set WasIN_MM040 to 0
  68.     if field "complete" = " " then
  69.       put get_UserName() into line the number of lines in field "complete" of field "complete"
  70.     else
  71.       put get_UserName() into line the number of lines in field "complete" + 1 of field "complete"
  72.     end if
  73.     set NumOfUsers to 1 + NumOfUsers
  74.     setaProp(IndexList, value("#" & get_UserProp()), "TT" & NumOfUsers)
  75.     set CurrentFile to "TT" & NumOfUsers
  76.     set save to the itemDelimiter
  77.     set the itemDelimiter to "@"
  78.     put field "complete" into item 1 of theInfo
  79.     put IndexList into item 2 of theInfo
  80.     put NumOfUsers into item 3 of theInfo
  81.     set the itemDelimiter to save
  82.     if objectp(IndexPointer) then
  83.       IndexPointer(mdispose)
  84.     end if
  85.     set IndexData to string(theInfo)
  86.     set IndexPointer to FileIO(mnew, "write", HDfilePath & "index.txt")
  87.     IndexPointer(mWriteString, IndexData)
  88.     if objectp(IndexPointer) then
  89.       IndexPointer(mdispose)
  90.     end if
  91.     SaveToFile()
  92.   end if
  93. end
  94.  
  95. on get_UserExist theUser
  96.   set i to 1
  97.   set Found to 0
  98.   repeat while not Found and (i <= the number of lines in field "complete")
  99.     if line i of field "complete" = theUser then
  100.       set Found to 1
  101.       next repeat
  102.     end if
  103.     set i to i + 1
  104.   end repeat
  105.   return Found
  106. end
  107.  
  108. on UpdateUserGlobals theFile
  109.   global HDfilePath, CDfilePath, PCDEL, FilePointer, CurrentFile, TAGS_DATA, TAGS_TITLES, TAGS_LIST, NotePadText, ScoreByTasksList
  110.   set CurrentFile to theFile
  111.   if objectp(FilePointer) then
  112.     FilePointer(mdispose)
  113.   end if
  114.   set FilePointer to FileIO(mnew, "read", HDfilePath & CurrentFile & ".txt")
  115.   set UserData to FilePointer(mReadFile)
  116.   if objectp(FilePointer) then
  117.     FilePointer(mdispose)
  118.   end if
  119.   set save to the itemDelimiter
  120.   set the itemDelimiter to "$"
  121.   set TAGS_TITLES to item 1 of UserData
  122.   set TAGS_DATA to item 2 of UserData
  123.   set TAGS_LIST to value(string(item 3 of UserData))
  124.   set WasScreens to item 4 of UserData
  125.   set NotePadText to item 5 of UserData
  126.   set ScoreByTasksList to value(string(item 6 of UserData))
  127.   set the itemDelimiter to save
  128.   Set_WasInPathTool01(line 1 of WasScreens)
  129.   Set_WasInPathTool02(line 2 of WasScreens)
  130.   Set_WasInPathTool03(line 3 of WasScreens)
  131.   Set_WasInPathTool04(line 4 of WasScreens)
  132.   Set_WasInPathTool05(line 5 of WasScreens)
  133.   Set_WasInPathTool06(line 6 of WasScreens)
  134.   Set_WasInPathTool07(line 7 of WasScreens)
  135.   Set_WasInPathTool08(line 8 of WasScreens)
  136.   Set_WasInPathTool10(line 10 of WasScreens)
  137.   Set_WasInPathTool11(line 11 of WasScreens)
  138.   Set_WasInPathTool12(line 12 of WasScreens)
  139.   Set_WasInPathTool13(line 13 of WasScreens)
  140. end
  141.  
  142. on DeleteLIST theText
  143.   global IndexList, DeletePointer, HDfilePath, NumOfUsers, IndexPointer
  144.   repeat with i = 1 to the number of chars in theText
  145.     if char i of theText = " " then
  146.       put "_" into char i of theText
  147.     end if
  148.   end repeat
  149.   set theFile to getaProp(IndexList, value("#" & theText))
  150.   if objectp(DeletePointer) then
  151.     DeletePointer(mdispose)
  152.   end if
  153.   set DeletePointer to FileIO(mnew, "read", HDfilePath & theFile & ".txt")
  154.   DeletePointer(mDelete)
  155.   deleteProp(IndexList, value("#" & theText))
  156. end
  157.  
  158. on SaveIndexFile
  159.   global IndexList, DeletePointer, HDfilePath, NumOfUsers, IndexPointer
  160.   set save to the itemDelimiter
  161.   set the itemDelimiter to "@"
  162.   put field "complete" into item 1 of theInfo
  163.   put IndexList into item 2 of theInfo
  164.   put NumOfUsers into item 3 of theInfo
  165.   set the itemDelimiter to save
  166.   if objectp(IndexPointer) then
  167.     IndexPointer(mdispose)
  168.   end if
  169.   set IndexData to string(theInfo)
  170.   set IndexPointer to FileIO(mnew, "write", HDfilePath & "index.txt")
  171.   IndexPointer(mWriteString, IndexData)
  172.   if objectp(IndexPointer) then
  173.     IndexPointer(mdispose)
  174.   end if
  175. end
  176.  
  177. on SaveToFile
  178.   global HDfilePath, CDfilePath, PCDEL, FilePointer, CurrentFile
  179.   if objectp(FilePointer) then
  180.     FilePointer(mdispose)
  181.   end if
  182.   set FileData to Get_UserData()
  183.   set FilePointer to FileIO(mnew, "write", HDfilePath & CurrentFile & ".txt")
  184.   FilePointer(mWriteString, FileData)
  185.   if objectp(FilePointer) then
  186.     FilePointer(mdispose)
  187.   end if
  188. end
  189.  
  190. on Get_UserData
  191.   global HDfilePath, CDfilePath, PCDEL, FilePointer, CurrentFile, TAGS_DATA, TAGS_TITLES, TAGS_LIST, NotePadText, ScoreByTasksList
  192.   set theData to EMPTY
  193.   set save to the itemDelimiter
  194.   set the itemDelimiter to "$"
  195.   put TAGS_TITLES into item 1 of theData
  196.   put TAGS_DATA into item 2 of theData
  197.   put TAGS_LIST into item 3 of theData
  198.   put Get_WasInPathTool01() into line 1 of WasScreens
  199.   put Get_WasInPathTool02() into line 2 of WasScreens
  200.   put Get_WasInPathTool03() into line 3 of WasScreens
  201.   put Get_WasInPathTool04() into line 4 of WasScreens
  202.   put Get_WasInPathTool05() into line 5 of WasScreens
  203.   put Get_WasInPathTool06() into line 6 of WasScreens
  204.   put Get_WasInPathTool07() into line 7 of WasScreens
  205.   put Get_WasInPathTool08() into line 8 of WasScreens
  206.   put Get_WasInPathTool10() into line 10 of WasScreens
  207.   put Get_WasInPathTool11() into line 11 of WasScreens
  208.   put Get_WasInPathTool12() into line 12 of WasScreens
  209.   put Get_WasInPathTool13() into line 13 of WasScreens
  210.   put WasScreens into item 4 of theData
  211.   put NotePadText into item 5 of theData
  212.   put ScoreByTasksList into item 6 of theData
  213.   set the itemDelimiter to save
  214.   return theData
  215. end
  216.  
  217. on initSpriteNums
  218.   initGeneralScreen()
  219.   initNameStrokeScreen()
  220.   initNameScrollScreen()
  221.   initScrollVars()
  222.   set_CurrLogic(EMPTY)
  223. end
  224.  
  225. on initGeneralScreen
  226.   SetWhichText(field "Complete")
  227.   set_NewNameSprite(3)
  228.   set_NameListSprite(4)
  229.   set_NextCoverSprite(30)
  230.   Set_NEXTSprite(28)
  231.   set the visible of sprite get_NextCoverSprite() to 1
  232. end
  233.  
  234. on handleGeneralSPuppets bool
  235.   set the puppet of sprite get_NewNameSprite() to bool
  236.   set the puppet of sprite get_NameListSprite() to bool
  237. end
  238.  
  239. on initNameStrokeScreen
  240.   set_NewNameCancelSprite(5)
  241.   setAlfaBet()
  242.   setNumOfCharsLimit(12)
  243.   set_NewNameOKSprite(6)
  244. end
  245.  
  246. on handleNameStrokePuppets bool
  247.   set the puppet of sprite get_NewNameCancelSprite() to bool
  248.   set the puppet of sprite get_NewNameOKSprite() to bool
  249. end
  250.  
  251. on initNameScrollScreen
  252.   set_NameScrollCancelSprite(7)
  253.   set_NameScrollDeleteSprite(8)
  254.   set_NameScrollOKSprite(9)
  255. end
  256.  
  257. on handleNameScrollPuppets bool
  258.   set the puppet of sprite get_NameScrollCancelSprite() to bool
  259.   set the puppet of sprite get_NameScrollDeleteSprite() to bool
  260.   set the puppet of sprite get_NameScrollOKSprite() to bool
  261.   set the puppet of sprite getLinePuppetSprite() to bool
  262.   set the puppet of sprite GetSliderSprite() to bool
  263.   puppetSprite(getNameDownArrow(), bool)
  264.   puppetSprite(getNameUpArrow(), bool)
  265.   set the immediate of sprite getThumbSprite() to 1
  266.   set the puppet of sprite getThumbSprite() to bool
  267. end
  268.  
  269. on set_NewNameSprite int
  270.   global NewNameSprite
  271.   set NewNameSprite to int
  272. end
  273.  
  274. on get_NewNameSprite
  275.   global NewNameSprite
  276.   return NewNameSprite
  277. end
  278.  
  279. on set_NameListSprite int
  280.   global NameListSprite
  281.   set NameListSprite to int
  282. end
  283.  
  284. on get_NameListSprite
  285.   global NameListSprite
  286.   return NameListSprite
  287. end
  288.  
  289. on set_NewNameCancelSprite int
  290.   global NewNameCancelSprite
  291.   set NewNameCancelSprite to int
  292. end
  293.  
  294. on get_NewNameCancelSprite
  295.   global NewNameCancelSprite
  296.   return NewNameCancelSprite
  297. end
  298.  
  299. on set_NewNameOKSprite int
  300.   global NewNameOKSprite
  301.   set NewNameOKSprite to int
  302. end
  303.  
  304. on get_NewNameOKSprite
  305.   global NewNameOKSprite
  306.   return NewNameOKSprite
  307. end
  308.  
  309. on set_NameScrollCancelSprite int
  310.   global NameScrollCancelSprite
  311.   set NameScrollCancelSprite to int
  312. end
  313.  
  314. on get_NameScrollCancelSprite
  315.   global NameScrollCancelSprite
  316.   return NameScrollCancelSprite
  317. end
  318.  
  319. on set_NameScrollDeleteSprite int
  320.   global NameScrollDeleteSprite
  321.   set NameScrollDeleteSprite to int
  322. end
  323.  
  324. on get_NameScrollDeleteSprite
  325.   global NameScrollDeleteSprite
  326.   return NameScrollDeleteSprite
  327. end
  328.  
  329. on set_NameScrollOKSprite int
  330.   global NameScrollOKSprite
  331.   set NameScrollOKSprite to int
  332. end
  333.  
  334. on get_NameScrollOKSprite
  335.   global NameScrollOKSprite
  336.   return NameScrollOKSprite
  337. end
  338.  
  339. on set_NextCoverSprite int
  340.   global NextCoverSprite
  341.   set NextCoverSprite to int
  342. end
  343.  
  344. on get_NextCoverSprite
  345.   global NextCoverSprite
  346.   return NextCoverSprite
  347. end
  348.  
  349. on SetWhichText str
  350.   global WhichText
  351.   set WhichText to str
  352. end
  353.  
  354. on GetWhichText
  355.   global WhichText
  356.   return WhichText
  357. end
  358.  
  359. on EnableBtn theSpriteNum, theCastName
  360.   set the castNum of sprite theSpriteNum to the number of cast theCastName
  361.   if theCastName = "NameUp" then
  362.     Set_ArrowsOn(1, 1)
  363.   else
  364.     if theCastName = "nameDown" then
  365.       Set_ArrowsOn(2, 1)
  366.     end if
  367.   end if
  368. end
  369.  
  370. on DisableBtn theSpriteNum, theCastName
  371.   if theCastName = "NameUp" then
  372.     Set_ArrowsOn(1, 0)
  373.   else
  374.     if theCastName = "nameDown" then
  375.       Set_ArrowsOn(2, 0)
  376.     end if
  377.   end if
  378.   set the castNum of sprite theSpriteNum to the number of cast theCastName
  379. end
  380.  
  381. on Set_NEXTSprite int
  382.   global NEXTSprite
  383.   set NEXTSprite to int
  384. end
  385.  
  386. on get_NEXTSprite
  387.   global NEXTSprite
  388.   return NEXTSprite
  389. end
  390.  
  391. on Set_ArrowsOn arrowNUm, bool
  392.   global ArrowsOn
  393.   put bool into item arrowNUm of ArrowsOn
  394. end
  395.  
  396. on get_ArrowsOn arrowNUm
  397.   global ArrowsOn
  398.   return integer(item arrowNUm of ArrowsOn)
  399. end
  400.  
  401. on DoNothing
  402. end
  403.