How to control the movement of objects with Macromedia Flash 8 direction keys - How to control the movement of objects with Macromedia Flash 8 direction keys

王林
Release: 2024-03-04 12:28:38
forward
415 people have browsed it

php editor Apple brings you the method of controlling the movement of objects using Macromedia Flash 8 direction keys. When using Macromedia Flash 8 to create animations or games, you can enhance interactivity and user experience by setting direction keys to control the movement of objects. Next, we will introduce in detail how to use the arrow keys to control the movement of objects in Macromedia Flash 8 to make your works more vivid and interesting.

Open flash 8 and create a flash document

Macromedia Flash 8方向键怎么控制物品移动-Macromedia Flash 8方向键控制物品移动的方法

Draw a strokeless square of size 50*50 on the stage

Macromedia Flash 8方向键怎么控制物品移动-Macromedia Flash 8方向键控制物品移动的方法

Select the square, press F8 to convert it to a movie clip, and name it Move

Macromedia Flash 8方向键怎么控制物品移动-Macromedia Flash 8方向键控制物品移动的方法

The block instance is named yidong

Macromedia Flash 8方向键怎么控制物品移动-Macromedia Flash 8方向键控制物品移动的方法

Create a new layer

Macromedia Flash 8方向键怎么控制物品移动-Macromedia Flash 8方向键控制物品移动的方法

Draw any shape on the layer

Macromedia Flash 8方向键怎么控制物品移动-Macromedia Flash 8方向键控制物品移动的方法

Press F8 to convert to a button component and name it Control

Macromedia Flash 8方向键怎么控制物品移动-Macromedia Flash 8方向键控制物品移动的方法

Select this button and press F9 to open the action bar

Macromedia Flash 8方向键怎么控制物品移动-Macromedia Flash 8方向键控制物品移动的方法

Enter the script inside:

on (keyPress "") {

yidong._y-=10

}

on (keyPress "") {

yidong._y =10

}

on (keyPress "") {

yidong._x-=10

}

on (keyPress "") {

yidong._x =10

}

Macromedia Flash 8方向键怎么控制物品移动-Macromedia Flash 8方向键控制物品移动的方法

Press F9 to exit editing, then select the button component again, select Alpha as the color option in the property bar, and set the value to 0%

Macromedia Flash 8方向键怎么控制物品移动-Macromedia Flash 8方向键控制物品移动的方法

At this time, the button component has become transparent

Macromedia Flash 8方向键怎么控制物品移动-Macromedia Flash 8方向键控制物品移动的方法

The above are all the steps for using the direction keys to control the movement of objects. Next, you can press Ctrl (control key) Enter (enter key) to test

Macromedia Flash 8方向键怎么控制物品移动-Macromedia Flash 8方向键控制物品移动的方法

The above is the detailed content of How to control the movement of objects with Macromedia Flash 8 direction keys - How to control the movement of objects with Macromedia Flash 8 direction keys. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:pcsoft.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!