First, i don't know what is mc_avance.
Since it appears in a "for" loop, my best guess it's another button that you have outside the loop. So it's kind of odd.
You're using a button to remove what?
The "this" keyword inside a function represents the current movieclip, so in your case, "this" is equivalent to mc_avance, so basically you're trying to remove from mc_informatcion, the "mc_avance" movieclip, which doesn't exist there.
So my idea would be this: you create the mc_modelo movieclips, next create the mc_avance movieclips in the same loop, so for each mc_modelo you have a button to click on.
Something like
var mc_avance:MovieClip = _root.mc_informacion.attachMovie("button_id","button_"+ i,k);
k++; // do that or else it will erase the mc_informatcion movies
- var mc_avance:MovieClip = _root.mc_informacion.attachMovie("button_id","button_"+ i,k);
- k++; // do that or else it will erase the mc_informatcion movies
Then set: mc_avance.targetClip = mc_modelo;
and in the mc_avance.onRelease function, you go either by
_root.mc_informacion.removeMovieClip(this.targetClip);
or
this.targetClip._parent.removeMovieClip(this.targetClip);
I tend not to use _root reference, but it's your choice.
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”