FLASH的AS请教

来源:百度知道 编辑:UC知道 时间:2024/06/23 03:09:41
我现在做了5个元件
a_mc b_mc c_mc d_mc
现在 我希望上面4个元件一起拉到元件x_mc上面的时候
执行gotoandplay这个命令
我想请教高手门这里要用什么AS好?
具体一点 写写

在abcd每个元件上面写:
onClipEvent(mouseDown){
startDrag("a_mc");//如果是其他mc,就换成b c d
}
onClipEvent(mouseUp){
stopDrag();
}
在x_mc上写:
onClipEvent(load){
if ( (this.hitTest(a_mc) ) && ( this.hitTest(b_mc) ) && (this.hitTest(c_mc) ) && ( this.hitTest(d_mc) ) ){
gotoAndPlay(2)
}

}

if(x_mc.hitTest(a_mc) && x_mc.hitTest(b_mc) && x_mc.hitTest(c_mc) && x_mc.hitTest(d_mc)){
gotoAndPlay(2)
}