One step by step, ActionScript 2.0 (4)

xiaoxiao2021-03-06  48

Where can I put ActionScript? [Learning Objectives]: To learn from your own practice, we can add scripts. If everyone is familiar with the functions of the action panel, what is most concerned now when we do animations when we directed, what is the script? It can be summarized in a simple sentence. "Who can trigger the script to run, if you are, it is a soil, it is also a good understanding, let's take a few detail below.

First, the placement of the AS has two types of "elements" in the element of Flash, "carry" AS, which is a key and a particular component on the timeline. 1, the key to the timeline You can add scripts to any key to the time axis (note must be critical), according to our experience of animation, each scene has time axis, each scene is also There are several layers, and there is also a key to the components. As long as we have the key, we can add foot, but here must have a habit, put the script independently in a layer, this layer does not Put, it is a script carrier so that you have a modification of the script in the future. Look at the picture below. 2, specific components about the concept of the component, I just said that you want to think of "actors" in your director, here, add a specific, in three types, "graphics components "Excluding," Graphic Components "cannot load scripts, so we can add it on the movie clip, but these two element trigger the" event "of the script. Second, the form of AS in the form of AS has two kinds. 1. Code fragment: The distribution of "scattered" is on different key, movie clips, buttons. 2, the code file: is the code independent in the form of a file, the file extension is .as, if you need it, use "#include" to include your script file, such as this: #include "[PATH ] filename.as ", this code can be reused, the special point here is the class, which is an independent AS file. Its leaders are not like this. This will be described in detail later. This part you have to know the AS to put 2 positions.

Tutorial

http://jinjunshi.blogchina.com

转载请注明原文地址:https://www.9cbs.com/read-73097.html

New Post(0)