In the past two years, with the development of Web games, as3 programming has become increasingly popular. As a client gameProgramPersonnel, it is also necessary to get in touch with emerging programming technologies. I recently played as3 in my spare time and got started with programming-related technologies.
Everything starts hard. as3 is a scripting language. Its syntax is similar to that of Java and C #. learning is not difficult. experienced programmers can get familiar with it in a week. In addition to syntax learning, the establishment of the programming environment is also the first.
In fact, the best learning method is not to write helloworld by yourself, but to download some good demos online and analyze the source code directly.
I downloaded an as3 edition Tetris project, a classic mini game for analysis.
First, we will introduce the as3 files of this project:
. As is the script file, .flag is the project file, and .swf is the output running file.
The following two tools are used to analyze the as3 programming environment: flashbuilder4 and flash cs5.
If there is a project's. As and. FLA files, you can directly open the. FLA file with flashbuilder4 or flash cs5 to compile and run it.
Flash cs5:
Flash Builder 4:
If there is only a. As file and No. FLA file, you need to create a project in the tool.
Flash Builder 4:
Create a actioscript project, and enter the project name, project file path, and other settings as prompted. Then, you can create the project file.
Then, overwrite the downloaded as file to the as file in the project and debug or run it.
Flash CS 5:
Create an actionscript3.0 project:
Save the project file to the directory where the downloaded. As file is located:
In the class Settings area, set it to the class name of the downloaded. As file: Tetris, and then debug and run it.
So far, the two as3 compilation tools have been initially introduced.