home *** CD-ROM | disk | FTP | other *** search
- global gLinea, gNomeFile, gID, gIDSel, gNomeFileSel, gCollPriv, gMuseoSel, oldlinea, gLineaSel, gStatoSel, gCittaSel
-
- on selezionastato
- sprite(9).member = member(gStatoSel, "cartine")
- sprite(3).visible = 0
- set the text of field "path" to gStatoSel && ">"
- elencocitta = []
- the itemDelimiter = "#"
- repeat with i = 1 to the number of lines in field "dati"
- dati = line i of field "dati"
- tmp = item 1 of dati
- if tmp = gStatoSel then
- citta = item 2 of dati
- tmp2 = getOne(elencocitta, citta)
- if tmp2 = 0 then
- append(elencocitta, citta)
- end if
- end if
- end repeat
- member("cittaTXT").text = EMPTY
- repeat with k = 1 to count(elencocitta)
- citta2 = getAt(elencocitta, k)
- set the text of field "cittaTXT" to the text of field "cittaTXT" & RETURN & citta2
- end repeat
- set the text of field "cittaTXT" to the text of field "cittaTXT" & RETURN & EMPTY
- delete line 1 of field "cittaTXT"
- member("cittaTXT").scrollTop = 0
- sprite(3).visible = 1
- cursor(-1)
- end
-
- on selezionacitta
- sprite(3).visible = 0
- the itemDelimiter = "#"
- elencomusei = []
- repeat with i = 1 to the number of lines in field "dati"
- dati = line i of field "dati"
- tmp = item 2 of dati
- if tmp = gCittaSel then
- museo = item 3 of dati
- tmp2 = getOne(elencomusei, museo)
- if tmp2 = 0 then
- append(elencomusei, museo)
- end if
- end if
- end repeat
- repeat with k = 1 to count(elencomusei)
- citta2 = getAt(elencomusei, k)
- set the text of field "museoTXT" to the text of field "museoTXT" & RETURN & citta2
- end repeat
- set the text of field "museoTXT" to the text of field "museoTXT" & RETURN & EMPTY
- delete line 1 of field "museoTXT"
- member("museoTXT").scrollTop = 0
- if gMuseoSel = 0 then
- set the foreColor of line 1 of field "museoTXT" to 6
- repeat with i = 2 to the number of lines in field "museoTXT"
- set the foreColor of line i of field "museoTXT" to 255
- end repeat
- gMuseoSel = line 1 of field "museoTXT"
- else
- repeat with i = 1 to the number of lines in field "museoTXT"
- museo = line i of field "museoTXT"
- if museo = gMuseoSel then
- exit repeat
- end if
- end repeat
- set the foreColor of field "museoTXT" to 255
- set the foreColor of line i of field "museoTXT" to 6
- end if
- set the foreColor of member "cittaTXT" to 255
- oldlinea = 0
- gLineaSel = 0
- gLinea = 0
- end
-
- on selezionaopere
- sprite(19).visible = 0
- member("opereTXT").text = EMPTY
- the itemDelimiter = "#"
- elencoopere = []
- repeat with i = 1 to the number of lines in field "dati"
- dati = line i of field "dati"
- tmp = item 3 of dati
- if tmp = gMuseoSel then
- opera = item 4 of dati
- tmp2 = getOne(elencoopere, opera)
- if tmp2 = 0 then
- append(elencoopere, opera)
- end if
- end if
- end repeat
- repeat with k = 1 to count(elencoopere)
- citta2 = getAt(elencoopere, k)
- set the text of field "opereTXT" to the text of field "opereTXT" & RETURN & citta2
- end repeat
- delete line 1 of field "opereTXT"
- set the text of field "opereTXT" to the text of field "opereTXT" & RETURN & EMPTY
- if the number of member gMuseoSel of castLib "schedemusei" <> -1 then
- sprite(16).member = member(gMuseoSel, "schedemusei")
- end if
- member("MuseoSel").text = gMuseoSel
- member("path").text = gStatoSel && ">" && gCittaSel && ">" && gMuseoSel
- member("opereTXT").scrollTop = 0
- set the foreColor of field "opereTXT" to 255
- creaelencoopere()
- sprite(19).visible = 1
- gLineaSel = 0
- gCollPriv = 0
- oldlinea = 0
- end
-
- on attivatastimuseo
- global gMuseoSel, gWWW, gMail
- the itemDelimiter = "#"
- repeat with i = 1 to the number of lines in field "musei"
- if item 1 of line i of field "musei" = gMuseoSel then
- exit repeat
- end if
- end repeat
- gWWW = item 2 of line i of field "musei"
- gMail = item 3 of line i of field "musei"
- if gWWW <> EMPTY then
- sprite(13).member = member("internet")
- else
- sprite(13).member = member("internetF4")
- end if
- if gMail <> EMPTY then
- sprite(14).member = member("email")
- else
- sprite(14).member = member("emailF4")
- end if
- sprite(15).member = member("entramuseo")
- end
-
- on controlladoppi
- updateStage()
- tmp = sprite(3).member.name
- lineeDoppie = []
- repeat with i = 1 to member(tmp).line.count / 2
- testo = member(tmp).line[i]
- if testo = EMPTY then
- next repeat
- end if
- repeat with q = 1 to member(tmp).line.count
- if q = i then
- next repeat
- end if
- if testo = member(tmp).line[q] then
- append(lineeDoppie, i)
- end if
- end repeat
- end repeat
- if count(lineeDoppie) <> 0 then
- repeat with j = count(lineeDoppie) down to 1
- delete member(tmp).line[getAt(lineeDoppie, j)]
- end repeat
- end if
- repeat with w = 1 to member(tmp).line.count
- if member(tmp).line[w] = EMPTY then
- delete member(tmp).line[w]
- end if
- end repeat
- sprite(3).visible = 1
- end
-