将_root.getNextHighestDepth(), 参数改成 1000就行了 或者任意值
错误分析:1:getNextHighestDepth(), 方法-----可用性:ActionScript 1.0、Flash Player 7
2:("图标"+objectID, "ball_"+objectID ----新旧目标的ID不要相同,深度不要相同
改正:curIcon = attachMovie("图标"+objectID, "ball_"+_root.shendu,_root.shendu, {_x:Math.random()*90+450, _y:Math.random()*30});
总结:因为as的版本很多 所以不要错误啊!这种错误很难找出来的 看上去就是正确的,加之你有没见过其他版语言
哈哈 版本方法错用了哦
function CopyPiao()//飘的对象
{
var objectID=(random(22)+1);
//处理ID _x,_y
curIcon = attachMovie("图标"+objectID, "ball_"+objectID, _root.getNextHighestDepth(), {_x:Math.random()*90+450, _y:Math.random()*30});
//处理速度 (经测试)
trace("curIcon="+curIcon);
curIcon.xspeed = random(2)-3;//Math.random()*1+3;//Math.random()*7+1;//Math.random()*8;//Math.random()*8;
curIcon.yspeed = random(4)+2 ;//Math.random()*5+1;//Math.random()*6;
//处理大小
scale = Math.random()*50+50;
curIcon._xscale = scale;
curIcon._yscale = scale;
//宝物出现的处理
//baoNum = baoNum + 1;
// if (baoNum >= 5)
// {
// baoNum = 0;
// ShowBao();
// } // end if
curIcon.onEnterFrame = function() {
this._x += this.xspeed;
this._y += this.yspeed;
//if(this.hitTest(_root.mc_panda._x,_root.mc_panda._y,false))
if(this.hitTest(_root.mc_panda))
{
trace("OK");
_root.touch_music.start();//加分音乐
_root.count++; //数目++
_root.m_count=_root.count;
_root.score+=_root.levels*100;
//for(var i=1;i<String(count).length+1;i++)
// {
// if(i!=5)
// {
// tmpArray[i-1]=String(count+1000).charAt(i-1);
// eval("s"+(i-1)).gotoAndPlay(tmpArray[i-1]);
// }
// }
//成绩++
unloadMovie(this);
}
else if(this._y>=590)
{
unloadMovie(this);
}
}
}