Set Variable: "x_value"
= GetProperty ("/target_item", _x)-5
Set Property ("/target_item", X Position) = x_value
Set Property ("/target_item", Rotation) = GetProperty ("/target_item",
_rotation)-5
即表示动感球体向左移5,并逆时针旋转5。
第三个关键帧的Actions为:
Go to and Play (2)
即与第二个关键帧形成循环。
3)点击等时线窗口左上角的Scene1按钮,切换到场景1。打开图符资料库窗口,并拖动to
left到左按钮附近,如图所示。
定义to left的实体名称为:left。
4)双击左按钮,并切换到Actions选项卡。输入程序:
On (Press)
Begin Tell Target ("left")
Go to and Play (2)
End Tell Target
End On
On (Release, Release Outside, Roll Over, Roll Out, Drag Over, Drag
Out) Begin Tell Target ("left")
Go to and Stop (1)
End Tell Target
End On
即当按下左按钮时,调用实体名为“left”为Movie Clip,并从二帧开始播放。当按钮处于其他状态时,则停留在实体名称为“left”的Movie
Clip的第一帧。
5)同理制作Movie Clip:toright(向右)、toup(向上)、todown(向下)、letgo(放大)、letoback(缩小),并在按钮的Actions选项卡中输入相应的程序。