bonjour tout le monde
après avoir créer un symbole Movie Clip, je l'appelle via le constructeur attachMovie dans une boucle for afin de créer plusieurs copies, le script est le suivant :
et il ça marche bien
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 a = random(101); for (i=1; i<=a; i++) { this.attachMovie("aa", "m_mc"+i, i); _root["m_mc"+i]._alpha = 50; _root["m_mc"+i]._x = random(500); _root["m_mc"+i]._y = random(300); _root["m_mc"+i]._xscale = _root["m_mc"+i]._yscale=random(101); }
le problème et le suivant:
je veux que ce script se déclenche après chaque 3s, pour cela, j'ai créé une fonction setInterval comme suit:
mais il ça marche pas, rien ne s'affiche après l'exécution.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 function compt() { a = random(101); for (i=1; i<=a; i++) { this.attachMovie("aa", "m_mc"+i, i); _root["m_mc"+i]._alpha = 50; _root["m_mc"+i]._x = random(500); _root["m_mc"+i]._y = random(300); _root["m_mc"+i]._xscale = _root["m_mc"+i]._yscale=random(101); } } setInterval(compt,3000);
quelqu'un peut m'aider un trouver où se trouve le problème SVP
Partager