加载的两个剪辑发生碰撞,如何用removeMovieClip("mymc_mc"+i);删除其中一个?谢谢
两个剪辑都是从库中加载后,用duplicateMovieClip("mymc_mc","mymc_mc"+i,this.getNextHighestDepth());复制...
两个剪辑都是从库中加载后,用duplicateMovieClip("mymc_mc", "mymc_mc"+i, this.getNextHighestDepth());
复制,但设置碰撞脚本后无法删除其中的一个。this.getNextHighestDepth());
碰撞后用removeMovieClip("mymc_mc"+i);}删除其中一个,却怎么也删不掉。
谢谢各位高手指教!!!
i = i++;
this.attachMovie("mymc", "mymc_mc", this.getNextHighestDepth());
_root["mymc_mc"]._x = 50;
_root["mymc_mc"]._y = 100;
if (i<=10) {
duplicateMovieClip("mymc_mc", "mymc_mc"+i, this.getNextHighestDepth());
_root["mymc_mc"+i]._x = _root["mymc_mc"]._x-i*150;
_root["mymc_mc"+i]._y = _root["mymc_mc"]._y+i*30;
}
this.attachMovie("A", "A_mc", this.getNextHighestDepth());
_root["A_mc"]._x = 250;
_root["A_mc"]._y = 300;
_root.onEnterFrame = function() {
if (_root["A_mc"].hitTest("mymc_mc"+i)) {
removeMovieClip("mymc_mc"+i);
}
}
trace(i);
t_txt = "i"+i;
i++; 展开
复制,但设置碰撞脚本后无法删除其中的一个。this.getNextHighestDepth());
碰撞后用removeMovieClip("mymc_mc"+i);}删除其中一个,却怎么也删不掉。
谢谢各位高手指教!!!
i = i++;
this.attachMovie("mymc", "mymc_mc", this.getNextHighestDepth());
_root["mymc_mc"]._x = 50;
_root["mymc_mc"]._y = 100;
if (i<=10) {
duplicateMovieClip("mymc_mc", "mymc_mc"+i, this.getNextHighestDepth());
_root["mymc_mc"+i]._x = _root["mymc_mc"]._x-i*150;
_root["mymc_mc"+i]._y = _root["mymc_mc"]._y+i*30;
}
this.attachMovie("A", "A_mc", this.getNextHighestDepth());
_root["A_mc"]._x = 250;
_root["A_mc"]._y = 300;
_root.onEnterFrame = function() {
if (_root["A_mc"].hitTest("mymc_mc"+i)) {
removeMovieClip("mymc_mc"+i);
}
}
trace(i);
t_txt = "i"+i;
i++; 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询