Friday, June 4, 2010

Flash ActionScript Animation - Top 10 of the basic code required

Here is a list of the 10 most useful codes you can use any version of Flash. These are necessary for the creation of websites, games and interactive animations. ActionScript can go in several places. (T) means that this code should be in the timeline under the action of a frame. (M) means that the code would go to the actions of a MovieClip.

First stop (); (T), the code more simple and useful. This is a frame of animation which is placed the code to stop. If I were a game or openingScreen film, this is a must.

According to the play (); (T), the last against the code. Located in the timeline to start the animation again.

Third gotoAndPlay (); (T) This code is much more significant and more often than the last, and allows you to specify the animation of a specific frame of animation to jump. Essential for the games. The number of frames that you want to go is inside the brackets in it. For example gotoAndPlay (10);

Fourth gotoAndStop (); (T) This code passes a certainFrame of the animation, but then it stops at this picture. Essential for the games. The number of frames that you want to go is inside the brackets in it. For example gotoAndPlay (10);

Fifth on (release) () (M) This code will each MovieClip the same functionality on a button, which means it does not always have to worry more about creating buttons. All the actions you want the button to do after you have clicked on that is set inside the parentheses. I have this code on every link or button on my site.His service was worth a box of alpha 0 in the MovieClip as a success for the area button.

On the sixth (rollOver) () (M), similar to the previous code. Except instead of an action happen when you click one happens when the mouse passes over. His service was worth a box of alpha 0 in the MovieClip as a success for the area button.

Seventh on (rollout) () (M) is the same as above, but which makes an action done when it pulls the mouseButton.

8th ifFrameLoaded ("end") ((T) A little 'more complicated here. This code is all you need to make a

gotoAndPlay ("start"); working preloader. Just name the last frame of animation in the "end" and
) The second frame "start". Put this code on first frame with a small animation will be loaded to make it even more interesting. The code means that when the last image is loaded (aka "end"), then the order to go play the first frame, called "start".

Ninth if () () (T) or (M)harder if-statement is essential for programming. This means that when they do "to" happens, then flash "b". The 'a' part goes into the terminal and the "b" part is in parentheses. An example, if (section == 1) (gotoAndPlay (10)) means that the film would go only to frame 10 when the variable part (as defined above) was set up would be 1. It 's important to note that Double = = are required to hand, when used in a bracket if-statement

10th _root. and this. (T) or(M) These two codes do many other important statements in certain situations. _root. is necessary if one refers to the main movie timeline. And these. is required if the equipment required for the MovieClip that you can rely on the code. wants So if the animation in a MovieClip to a certain structure inside and write would go this.gotoAndPlay (2) you want, when the main movie of alpha, for example, then change would write _root.alpha = 50;

Where to go. These are the topThe 10 codes most basic necessities for the flash animation to interactivity.

No comments:

Post a Comment