home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 41 / MOBICLIC41.ISO / pc / Data / PROM / VITRINE.CST / 00002_Script_2 < prev    next >
Text File  |  2001-09-07  |  874b  |  35 lines

  1. --MODULE DE ANIMATION
  2. --Gyorgy Gutierrez, ao√t 2001
  3.  
  4. global gAnimChildList, gEtatAnimList 
  5.  
  6. on initAnim
  7.   --initialization des objets magazine 
  8.   gAnimChildList = []
  9.   gEtatAnimList = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
  10.   repeat with i = 1 to 25
  11.     addAt gAnimChildList,i,new(script"anim mag",i+6)
  12.   end repeat
  13.   updateStage
  14. end
  15.  
  16. on gestAnim
  17.   --parametres de l'animation
  18.   --ordre est la liste aleatoire des nombre de zones a balayer 
  19.   --chance donne la probabilite de commencer une anim a l'arret
  20.   ordre = randomList(15,25)   
  21.   repeat with i in ordre
  22.     chance = random(75)     
  23.     tmp = getAt(gAnimChildList,i)
  24.     --on teste l'etat de l'anim de l'objet
  25.     if the ea of tmp = 0 then
  26.       if chance = 1 then
  27.         animate tmp           
  28.       end if
  29.     else
  30.       animate tmp
  31.     end if
  32.   end repeat  
  33. end
  34.  
  35.