flash 调用 脚本
Download the sample files here.
1. Create a circle and make it into a movie clip. Name it "circle".
1.创建一个圆并将其制作为影片剪辑。 将其命名为“圆圈”。
2. Right click the movieclip, and click "action" to go to the actions tab.
2.右键单击动画片段,然后单击“操作”以转到“操作”选项卡。
3. Insert the action below:
3.在下面插入操作:
// action to move left
onClipEvent (keyDown)
{
if (Key.isDown( key.LEFT))
{
_x-=10;
}
}
// action to move right
onClipEvent (keyDown)
{
if (Key.isDown( key.RIGHT))
{
_x+=10;
}
}
// action to move up
onClipEvent (keyDown)
{
if (Key.isDown( key.UP ))
{
_y-=10;
}
}
// action to move down
onClipEvent (keyDown)
{
if (Key.isDown( key.DOWN ))
{
_y+=10;
}
}
4. Done! Press ctrl+enter to test the movie, and press the arrow keys to see it work.
4.完成! 按ctrl + enter测试影片,然后按箭头键查看它是否正常工作。
flash 调用 脚本