I made it work by accident, but now the ["snow"+i3] is on _levelundefined according to the trace().PHP Code:onClipEvent (load){i3 = _parent.getNextHighestDepth();}
onClipEvent (mouseMove) {
i3 ++
//weird, because trace(i3) actually returns a increasing number.
attachMovie("snow","snow"+i3,i3);
with ("_level"+i3["snow"+i3]) { //working
_x = 0+40-80*Math.random();
_y = 0+45-90*Math.random();
_rotation = 60*Math.random();
_xscale = _yscale=30*Math.random();
_alpha = 100;
}
trace ("_level"+i3["snow"+i3].getDepth()); //output: _levelundefined
this.onEnterFrame = function() { //working
with (this) {
_x += _xscale/13;
_y -= _yscale/30;
_alpha -= 2;
if (_x>896 || _y>672 || _alpha<0) {
this.removeMovieClip();
}
}
};
updateAfterEvent();
}
but didn't I attach the clip to the depth i3?




Reply With Quote