查看: 1033|回复: 1
|
flash drag and drop
[复制链接]
|
|
我做一个人drag进一个机器在frame1,然后他会gotoandplay frame2.
那个人我把他convert to movie clip.然后
on(press) {
startDrag(this);
}
on(release) {
stopDrag();
}
然后我想drag进机器然后gotoandplay(2)应该怎样?
在gotoAndPlay(2);
}
之前应该放什么?
我试过 on release,on drag on, on drag over都不行,应该放什么? |
|
|
|
|
|
|
|
发表于 3-6-2007 12:42 PM
|
显示全部楼层
把機器也轉換成Movieclip, 然後給予一個instance name(如:machine), 然後修改一下你的script
on(release) {
stopDrag();
//加上判斷放開拖動後是否觸碰到機器
if(this.hitTest(machine)) {
this.gotoAndPlay(2);
}
} |
|
|
|
|
|
|
| |
本周最热论坛帖子
|