Step 1 for beginners of Flash ActionScript syntax (1) (example)

Source: Internet
Author: User

only this Article for beginners of Flash
flash formerly known as futuresplash, is an animation plug-in popular in the early days. Later, Macromedia the company acquired futuresplash and changed it to a loud name: flash . As features continue to grow, flash it is no longer a small plug-in the past, and has become a spokesperson for the new power of Internet animation production.

The most talked about isAsIt seems very difficult and insurmountable. Actually not that complicated,ARepresentativeAction, Action meaning,SRepresentativeScriptIs that what the script means? A simple definition in one sentence: falshAction Script (AS) is a scripting language. If you have been familiar with advanced languages, such as basic or C, you can easily master the Flash Action Script syntax, because action script is not a high-level language, it is far less powerful than other advanced languages.

First, let's look at an example. , Simple Control of video editing playback, pause, fast forward, fast return, stop.
1 Open Flash , Press CTRL + F8 Create a component Ball, Select a behavior chart and click OK. Select the Oval tool in the toolbox, and press and hold Shift The key is used to draw a circle in the workspace. Then press CTRL + F8 Create a component MC, Select a video clip and click OK. Then press CTRL + L Open the library panel and place the component in the first release Ball Drag to the stage and 30 Insert F6 Insert a key pair, adjust the position of the ball, and create an action population.
2 , Return to the stage work area, and edit the film in the library MC Drag the instance to the stage and name it MC You can press CTRL + enter Test, we can see that the ball keeps moving. The simplest one is not needed.




3Add a script.MCDo not play a video automatically at the beginning. Otherwise, how can we control it. Let's write the script on the key timeline. Select the first timeline, and pressF9Open the action panel, select EXPERT mode, and enter:_ Root. MC. Stop ();2.


What does that mean? Someone may ask. Let's explain it slowly.

4 Now let's create several buttons, indicating playing, pausing, moving forward, backward, and stopping. And placed on the stage. I will not introduce much about how to create buttons. Cough, just be a little lazy, huh, huh. Open the window menu and select another panel - Public Library - It's a pity that there are so many things. Double-click to open the library Playback Folder Gel right , Gel pause , Gel fast forward , Gel rewind , Gel stop The buttons are dragged to the stage, and the order and position are arranged in sequence. If you want to make it more beautiful, you can press CTRL + k Open the alignment panel, be sure not to select relative to the stage, select all buttons in the selection tool box, and click the bottom alignment and horizontal center distribution of the alignment panel.
Next, we will learn the first step of Flash ActionScript syntax (2)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.