home *** CD-ROM | disk | FTP | other *** search
/ Galleria D'arte: Manet / Manet.iso / Dati / Mappa.dxr / Internal_6_selezionamuseo.ls < prev    next >
Encoding:
Text File  |  2000-12-21  |  4.9 KB  |  165 lines

  1. global gLinea, gNomeFile, gID, gIDSel, gNomeFileSel, gCollPriv, gMuseoSel, oldlinea, gLineaSel, gStatoSel, gCittaSel
  2.  
  3. on selezionastato
  4.   sprite(9).member = member(gStatoSel, "cartine")
  5.   sprite(3).visible = 0
  6.   set the text of field "path" to gStatoSel && ">"
  7.   elencocitta = []
  8.   the itemDelimiter = "#"
  9.   repeat with i = 1 to the number of lines in field "dati"
  10.     dati = line i of field "dati"
  11.     tmp = item 1 of dati
  12.     if tmp = gStatoSel then
  13.       citta = item 2 of dati
  14.       tmp2 = getOne(elencocitta, citta)
  15.       if tmp2 = 0 then
  16.         append(elencocitta, citta)
  17.       end if
  18.     end if
  19.   end repeat
  20.   member("cittaTXT").text = EMPTY
  21.   repeat with k = 1 to count(elencocitta)
  22.     citta2 = getAt(elencocitta, k)
  23.     set the text of field "cittaTXT" to the text of field "cittaTXT" & RETURN & citta2
  24.   end repeat
  25.   set the text of field "cittaTXT" to the text of field "cittaTXT" & RETURN & EMPTY
  26.   delete line 1 of field "cittaTXT"
  27.   member("cittaTXT").scrollTop = 0
  28.   sprite(3).visible = 1
  29.   cursor(-1)
  30. end
  31.  
  32. on selezionacitta
  33.   sprite(3).visible = 0
  34.   the itemDelimiter = "#"
  35.   elencomusei = []
  36.   repeat with i = 1 to the number of lines in field "dati"
  37.     dati = line i of field "dati"
  38.     tmp = item 2 of dati
  39.     if tmp = gCittaSel then
  40.       museo = item 3 of dati
  41.       tmp2 = getOne(elencomusei, museo)
  42.       if tmp2 = 0 then
  43.         append(elencomusei, museo)
  44.       end if
  45.     end if
  46.   end repeat
  47.   repeat with k = 1 to count(elencomusei)
  48.     citta2 = getAt(elencomusei, k)
  49.     set the text of field "museoTXT" to the text of field "museoTXT" & RETURN & citta2
  50.   end repeat
  51.   set the text of field "museoTXT" to the text of field "museoTXT" & RETURN & EMPTY
  52.   delete line 1 of field "museoTXT"
  53.   member("museoTXT").scrollTop = 0
  54.   if gMuseoSel = 0 then
  55.     set the foreColor of line 1 of field "museoTXT" to 6
  56.     repeat with i = 2 to the number of lines in field "museoTXT"
  57.       set the foreColor of line i of field "museoTXT" to 255
  58.     end repeat
  59.     gMuseoSel = line 1 of field "museoTXT"
  60.   else
  61.     repeat with i = 1 to the number of lines in field "museoTXT"
  62.       museo = line i of field "museoTXT"
  63.       if museo = gMuseoSel then
  64.         exit repeat
  65.       end if
  66.     end repeat
  67.     set the foreColor of field "museoTXT" to 255
  68.     set the foreColor of line i of field "museoTXT" to 6
  69.   end if
  70.   set the foreColor of member "cittaTXT" to 255
  71.   oldlinea = 0
  72.   gLineaSel = 0
  73.   gLinea = 0
  74. end
  75.  
  76. on selezionaopere
  77.   sprite(19).visible = 0
  78.   member("opereTXT").text = EMPTY
  79.   the itemDelimiter = "#"
  80.   elencoopere = []
  81.   repeat with i = 1 to the number of lines in field "dati"
  82.     dati = line i of field "dati"
  83.     tmp = item 3 of dati
  84.     if tmp = gMuseoSel then
  85.       opera = item 4 of dati
  86.       tmp2 = getOne(elencoopere, opera)
  87.       if tmp2 = 0 then
  88.         append(elencoopere, opera)
  89.       end if
  90.     end if
  91.   end repeat
  92.   repeat with k = 1 to count(elencoopere)
  93.     citta2 = getAt(elencoopere, k)
  94.     set the text of field "opereTXT" to the text of field "opereTXT" & RETURN & citta2
  95.   end repeat
  96.   delete line 1 of field "opereTXT"
  97.   set the text of field "opereTXT" to the text of field "opereTXT" & RETURN & EMPTY
  98.   if the number of member gMuseoSel of castLib "schedemusei" <> -1 then
  99.     sprite(16).member = member(gMuseoSel, "schedemusei")
  100.   end if
  101.   member("MuseoSel").text = gMuseoSel
  102.   member("path").text = gStatoSel && ">" && gCittaSel && ">" && gMuseoSel
  103.   member("opereTXT").scrollTop = 0
  104.   set the foreColor of field "opereTXT" to 255
  105.   creaelencoopere()
  106.   sprite(19).visible = 1
  107.   gLineaSel = 0
  108.   gCollPriv = 0
  109.   oldlinea = 0
  110. end
  111.  
  112. on attivatastimuseo
  113.   global gMuseoSel, gWWW, gMail
  114.   the itemDelimiter = "#"
  115.   repeat with i = 1 to the number of lines in field "musei"
  116.     if item 1 of line i of field "musei" = gMuseoSel then
  117.       exit repeat
  118.     end if
  119.   end repeat
  120.   gWWW = item 2 of line i of field "musei"
  121.   gMail = item 3 of line i of field "musei"
  122.   if gWWW <> EMPTY then
  123.     sprite(13).member = member("internet")
  124.   else
  125.     sprite(13).member = member("internetF4")
  126.   end if
  127.   if gMail <> EMPTY then
  128.     sprite(14).member = member("email")
  129.   else
  130.     sprite(14).member = member("emailF4")
  131.   end if
  132.   sprite(15).member = member("entramuseo")
  133. end
  134.  
  135. on controlladoppi
  136.   updateStage()
  137.   tmp = sprite(3).member.name
  138.   lineeDoppie = []
  139.   repeat with i = 1 to member(tmp).line.count / 2
  140.     testo = member(tmp).line[i]
  141.     if testo = EMPTY then
  142.       next repeat
  143.     end if
  144.     repeat with q = 1 to member(tmp).line.count
  145.       if q = i then
  146.         next repeat
  147.       end if
  148.       if testo = member(tmp).line[q] then
  149.         append(lineeDoppie, i)
  150.       end if
  151.     end repeat
  152.   end repeat
  153.   if count(lineeDoppie) <> 0 then
  154.     repeat with j = count(lineeDoppie) down to 1
  155.       delete member(tmp).line[getAt(lineeDoppie, j)]
  156.     end repeat
  157.   end if
  158.   repeat with w = 1 to member(tmp).line.count
  159.     if member(tmp).line[w] = EMPTY then
  160.       delete member(tmp).line[w]
  161.     end if
  162.   end repeat
  163.   sprite(3).visible = 1
  164. end
  165.