I wrote these tutorials, the purpose is to hope that the fans of Flash for beginners can
Multiple hands, less questions. I will below these tutorials, including the readers of Flash (MX) basic operation knowledge. While watching my tutorial, I hope I can open Flash, I do it while you look, so your impression will be more profound, and you will see if I write wrong :)
AS grammatical articles
-----------------------------------
After reading my first tutorial - after the basic article, now you have a certain concept of AS's presence? If you haven't yet, then go to review it.
Getting Started Tutorial in Tuner Series - Basic Articles
Next, I want to talk about the syntax of the AS.
First of all, let everyone understand:
The size of the AS syntax is sensitive.
For example: gotoandplay () correct gotoandplay () error.
The spelling of keywords must be consistent with syntax, it is easy to do, because in the Flash's AS panel, keywords have different color display.
Many flash birds may start complaining, can't remember? I have a way here, it is back. Don't let the tears of your grievances, we all came over. You will remember more than two times.
Here, we have to develop a good habit of programming from the beginning. If you have a semicolon after each statement, it is possible, try to give a complex statement. Announcement example
// This is a comment, but only one line can
/ * This is also a comment, you can write a lot of lines * /
Next, introduce several types of syntax.
1, several commonly used control scenarios, such as
Play (); / / Let the timeline pointer play STOP (); // Stop the timeline of the timeline GotoandPlay (); // Let the pointer jump to a frame, then continue playing GotoAndStop ); / / Let the pointer to a frame to stop in that frame nextframe (); // take a frame down prevframe (); // take a frame forward
The above is a method.
method? Solution: Take a bit, we call to eat as a method to solve the problem of hungry. We manage STOP () called a method to solve the problem of time axis. We have a few things on the top of the tube to solve the problem of time axis pointer movement.
2, control the syntax of the attribute. There are a lot, I have listed a few
_X_Y_ALPHA_WIDTH_NAME ..... and so on
The above is all attributes
Attributes? Solution: Tell a bit. We manage your height called attributes to identify your height. We manage your body weight attribute, used to identify your quality. We used _X called attributes to identify the X-axis coordinate of the target. We tanal _alpha called attributes, used to identify transparency of the target ... I really rushed, hehe.
3. Control the syntax of the statement process, such as
IF (condition) {// Conditions to meet the code here} else {// Condition does not satisfy the code to do this} for (i = 0; i and many more. These are basic grammar and the foundation of AS. 4, other Methods and methods defined by themselves. Here I can't list all the grammar, because it is too much, and I can refer to the fund's own help manual for Flash. We can only be familiar with it in future applications. Here, you have a basic concept. Behind I will add comments to each sentence. Looking back, I want to remember this time: The size of the AS syntax is sensitive. Method concept. The concept of attributes. (to be continued)