I have no idea what is going on

It makes me angry. The code is simple and doesn’t work.
In a timeline of a movie I wrote:

  1. for (i=1; i<6; i++) {
    
  2. wave.duplicateMovieClip(“wave”+i,30+i);

  3. }

  4. function initposition(wn,xmax){

  5. for (s=1; s<6; s++) {

  6. this[wn+s]._x = xmax+15*s;

  7. this[wn+s]._y = 80;

  8. if (this[wn+s]._x>xmax) {

  9. this[wn+s]._visible = 0;
    
  10. }
    
  11. }

  12. }

  13. function movetoleft(wn, xmin, xmax) {

  14. for (j=1; j<6; j++) {

  15. _root[wn+j]._x = _root[wn+j]._x-2;

  16. etc etc etc

  17. }

  18. initposition(“wave”,170);

  19. 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: