将大的图片做成影片剪辑,依次命名为mc1、mc2、...
然后代码改为:
mc1.onMouseDown = function () {
if(this.hitTest(_xmouse,_ymouse,true)){
startDrag(this,false,380,256,440,398);
}
}
this.onMouseUp = function () {
stopDrag(); //
}
mc2.onMouseDown = function () {
if(this.hitTest(_xmouse,_ymouse,true)){
startDrag(this,false,380,256,440,398);
}
}
this.onMouseUp = function () {
stopDrag(); //
}
//......,有多少张大图片就加几个