It makes me angry. The code is simple and doesn’t work.
In a timeline of a movie I wrote:
-
for (i=1; i<6; i++) {
-
wave.duplicateMovieClip(“wave”+i,30+i);
-
}
-
function initposition(wn,xmax){
-
for (s=1; s<6; s++) {
-
this[wn+s]._x = xmax+15*s;
-
this[wn+s]._y = 80;
-
if (this[wn+s]._x>xmax) {
-
this[wn+s]._visible = 0;
-
}
-
}
-
}
-
function movetoleft(wn, xmin, xmax) {
-
for (j=1; j<6; j++) {
-
_root[wn+j]._x = _root[wn+j]._x-2;
-
etc etc etc
-
}
-
initposition(“wave”,170);
-
moviwave = setInterval(movetoleft,50,“wave”,31,170);
Why my friends? why? (crying) Why if I change ‘_root’ by ‘this’ in line 24 nothing happens? furthermore, if I put trace(this[wn+j]._x) in line 25 the output is ‘undefined’, but in line 20 the output shows the correct values.
I’ll be grateful for any help.
joe:hr: