home *** CD-ROM | disk | FTP | other *** search
/ Encyklopedia Omnia / Planeta.iso / data / f_panel.dir / 00008_Script_updatePanel < prev    next >
Text File  |  2000-11-09  |  1KB  |  47 lines

  1. on updatePanel
  2.   global gIndiceCategoria, gFirstListedParam, gValueList, gMaxParam
  3.   
  4.   repeat with i = 0 to 3
  5.     -- mostra le etichette
  6.     set ns = 20 + i
  7.     set etic = "c" & string(gIndiceCategoria) & "p" & string(i+gFirstListedParam)
  8.     set the member of sprite ns to member etic
  9.     
  10.     -- disattiva gli schermi e aggiorna i LED
  11.     set ns = 25 + i
  12.     set valore = getAprop(gValueList, etic)
  13.     if valore <> 0 then
  14.       set the loc of sprite ns to point(-1000, -1000)
  15.       case valore of
  16.         #on:
  17.           set ledLoc = value(line (i+1) of the text of field "LedPosOn")
  18.           set the loc of sprite (30+i) to ledLoc
  19.           
  20.         #off:
  21.           set ledLoc = value(line (i+1) of the text of field "LedPosOff")
  22.           set the loc of sprite (30+i) to ledLoc
  23.           
  24.         #void:
  25.           set the loc of sprite (30+i) to point(-1000, -1000)
  26.       end case
  27.     else
  28.       set the loc of sprite (30+i) to point(-1000, -1000)
  29.       set shieldLoc = value(line (i+1) of the text of field "shieldPos")
  30.       set the loc of sprite ns to shieldLoc
  31.     end if
  32.   end repeat
  33.   
  34.   -- aggiorna le freccie di scroll
  35.   if gFirstListedParam = 1 then
  36.     set the visible of sprite 7 to 0
  37.   else
  38.     set the visible of sprite 7 to 1
  39.   end if
  40.   if gFirstListedParam = gMaxParam then
  41.     set the visible of sprite 8 to 0
  42.   else
  43.     set the visible of sprite 8 to 1
  44.   end if
  45.   
  46.   updateStage
  47. end