其它的语句与刚才If中的基本相同,只是把red标签改为green标签就行了。设置好的这一段语句如下所示:
Else If (_droptarget eq "/target2")
Begin Tell Target("/dragmovie")
Go to and Play("green")
End Tell Target
同样,再加一段Else If,设置黄色方块拖动到蓝色圆中的情况,设置好的这段语句如下所示:
Else If (_droptarget eq "/target3")
Begin Tell Target("/dragmovie")
Go to and Play("blue")
End Tell Target
最后,我们还需要设置当黄色小方块不在这三个圆中的任何一个之内里的情况。选中If
(_droptarget eq "/target1"),点,还是设置Begin
Tell Target("/dragmovie"),只是把Go to语句的内容改为Go to and Play(1)。
这样我们就设置好了所有的Actions语句,下面列出整个Actions命令行:
On (Press)
Start Drag("/dragmovie")
End On
On (Release)
Stop Drag
If (_droptarget eq "/target1")
Begin Tell Target("/dragmovie")
Go to and Play("red")
End Tell Target
Else If (_droptarget eq "/target2")
Begin Tell Target("/dragmovie")
Go to and Play("green")
End Tell Target
Else If (_droptarget eq "/target3")
Begin Tell Target("/dragmovie")
Go to and Play("blue")
End Tell Target
Else
Begin Tell Target("/dragmovie")
Go to and Play(1)
End Tell Target
End If
End On