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

  1. on prepareMovie
  2.   dxRegister(111340792)
  3.   RegisterDirectEmail(161659558)
  4.   dcRegister(126904465)
  5.   dosRegister(90034659)
  6.   repeat with i = 70 to 75
  7.     sprite(i).visible = 0
  8.   end repeat
  9. end
  10.  
  11. on startMovie
  12.   global gMovie, gMaxPict, gListaPict, gTrascina, gTutorial
  13.   gMaxPict = the number of castMembers of castLib "pict"
  14.   gTrascina = 0
  15.   gMovie = "gadgets"
  16.   gListaPict = [5, 4, 3, 2, 1, #d, #d, #d, #d]
  17.   gTutorial = "Tgadget"
  18. end
  19.  
  20. on posizionaimmagini
  21.   global gListaPict, gMaxPict
  22.   repeat with i = 1 to 9
  23.     tmp = getAt(gListaPict, i)
  24.     if tmp <> #d then
  25.       set the member of sprite (19 + i) to member(tmp, "pict")
  26.       next repeat
  27.     end if
  28.     set the member of sprite (19 + i) to member("dummylittle", "internal")
  29.   end repeat
  30.   centrale = getAt(gListaPict, 5)
  31.   if centrale = 1 then
  32.     sprite(3).member = member("frsx_f3")
  33.     cursor(-1)
  34.   else
  35.     if centrale = gMaxPict then
  36.       sprite(4).member = member("frdx_f3")
  37.       cursor(-1)
  38.     else
  39.       sprite(3).member = member("frsx")
  40.       sprite(4).member = member("frdx")
  41.     end if
  42.   end if
  43.   tmp = the member of sprite 24
  44.   nome = member(tmp).name
  45.   the itemDelimiter = "#"
  46.   repeat with i = 1 to the number of lines in field "titolo#nomefile"
  47.     dati = line i of field "titolo#nomefile"
  48.     nomefile = item 2 of dati
  49.     if nomefile = nome then
  50.       titolo = item 1 of dati
  51.       set the text of field "dida" to titolo
  52.       exit repeat
  53.     end if
  54.   end repeat
  55. end
  56.  
  57. on scrolla direz
  58.   global gListaPict, gMaxPict
  59.   case direz of
  60.     1:
  61.       tmp = getAt(gListaPict, 5)
  62.       if tmp = 1 then
  63.         exit
  64.       end if
  65.       tmp = getAt(gListaPict, 1)
  66.       if tmp = #d then
  67.         deleteAt(gListaPict, 1)
  68.         tmp = getAt(gListaPict, 8)
  69.         nuovo = tmp - 1
  70.         if nuovo < 1 then
  71.           nuovo = #d
  72.         end if
  73.         addAt(gListaPict, 9, nuovo)
  74.       else
  75.         repeat with i = 1 to 9
  76.           tmp = getAt(gListaPict, i)
  77.           if tmp = #d then
  78.             exit repeat
  79.           end if
  80.           nuovo = tmp - 1
  81.           if nuovo < 1 then
  82.             nuovo = #d
  83.           end if
  84.           setAt(gListaPict, i, nuovo)
  85.         end repeat
  86.       end if
  87.     (-1):
  88.       tmp = getAt(gListaPict, 5)
  89.       if tmp = gMaxPict then
  90.         exit
  91.       end if
  92.       tmp = getAt(gListaPict, 9)
  93.       if tmp = #d then
  94.         deleteAt(gListaPict, 9)
  95.         tmp = getAt(gListaPict, 1)
  96.         nuovo = tmp + 1
  97.         if nuovo > gMaxPict then
  98.           nuovo = #d
  99.         end if
  100.         addAt(gListaPict, 1, nuovo)
  101.       else
  102.         repeat with i = 9 down to 1
  103.           tmp = getAt(gListaPict, i)
  104.           if tmp = #d then
  105.             exit repeat
  106.           end if
  107.           nuovo = tmp + 1
  108.           if nuovo > gMaxPict then
  109.             nuovo = #d
  110.           end if
  111.           setAt(gListaPict, i, nuovo)
  112.         end repeat
  113.       end if
  114.   end case
  115.   posizionaimmagini()
  116. end
  117.  
  118. on scrollacitazioni pDirezione
  119.   global gMaxCitazioni, gNumCitazione
  120.   gNumCitazione = gNumCitazione + pDirezione
  121.   sprite(2).member = member(gNumCitazione, "citazioni")
  122.   member("numerocitazione").text = gNumCitazione && "di" && gMaxCitazioni
  123.   if gNumCitazione = 1 then
  124.     sprite(7).blend = 50
  125.   else
  126.     if gNumCitazione = gMaxCitazioni then
  127.       sprite(6).blend = 50
  128.     else
  129.       sprite(7).blend = 100
  130.       sprite(6).blend = 100
  131.     end if
  132.   end if
  133. end
  134.  
  135. on stopMovie
  136.   global gListaPict, gLineaSel, gPict, gMaxPict, gTrascina, gAnn, gLinea, Connessione
  137.   gListaPict = 0
  138.   gLineaSel = 0
  139.   gPict = 0
  140.   gMaxPict = 0
  141.   gTrascina = 0
  142.   gAnn = 0
  143.   gLinea = 0
  144.   SCARICAMEM()
  145. end
  146.  
  147. on cancellaLinee
  148.   if the key = RETURN then
  149.     repeat with i = 2 to the number of lines in field "nome"
  150.       delete line i of field "nome"
  151.     end repeat
  152.     repeat with i = 2 to the number of lines in field "cognome"
  153.       delete line i of field "cognome"
  154.     end repeat
  155.     repeat with i = 2 to the number of lines in field "via"
  156.       delete line i of field "via"
  157.     end repeat
  158.     repeat with i = 2 to the number of lines in field "citta"
  159.       delete line i of field "citta"
  160.     end repeat
  161.     repeat with i = 2 to the number of lines in field "cap"
  162.       delete line i of field "cap"
  163.     end repeat
  164.     repeat with i = 2 to the number of lines in field "telefono"
  165.       delete line i of field "telefono"
  166.     end repeat
  167.     repeat with i = 2 to the number of lines in field "e-mail"
  168.       delete line i of field "e-mail"
  169.     end repeat
  170.     repeat with i = 2 to the number of lines in field "nomemittente"
  171.       delete line i of field "nomemittente"
  172.     end repeat
  173.     repeat with i = 2 to the number of lines in field "to"
  174.       delete line i of field "to"
  175.     end repeat
  176.   end if
  177. end
  178.