Dynamic text with three-dimensional ring rotation

Source: Internet
Author: User

Procedure:

1. Start Flash and select the [file] -- [new] command to create a new Flash file. Press the [Ctrl + J] key combination to open the "Document Properties" dialog box, set the size of the editing area to 400px × 150px, and the background color to black.

2. Select the [insert] [New component] command to open the "create new component" dialog box, and enter the character film in the "name" text box, select the single-choice button for "video editing" in the "action" option area, as shown in Figure 1.

 

3. Click [OK] to enter the component editing area. Select "text tool" in the toolbox, set the text type to "dynamic text" in the "properties" panel, font to "正 ", font size to 50, color to white, the line type is "single line". A dynamic text box is generated in the editing area.

4. Select the text box and enter the character textl in the "variable" text box on the "properties" panel, as shown in figure 2.

 

5. Click scenario 1 to switch to scenario 1 ". Select the [window] [library] command, open the "library" panel, and drag the film component to the editing area. Select a film instance and enter the character film in the "instance name" text box on the "properties" panel, as shown in figure 3.

 

6. Select 1st frames, press the [F9] Key, open the "action" panel, and add the following action script in the command editing area:

// Define the position of the ring in the animation
X OS = 200;
Yos = 70;
Sineof = 0;
Magn.pdf = 130;
Rspeed= 0.0036;
Sb = 0.28;
// Set the text content dynamically displayed in the ring. You can modify the content as needed.
MyText = "Flash178.com ";
MyLength = myText. length;
I = 1;
// Place each letter in the dynamic text you set in sequence into the copied animation fragment film
For (I; I <= myLength; I ++ ){
DuplicateMovieClip ("film", "char" + I, I );
_ Root ["char" + I]. _ x = xos;
_ Root ["char" + I]. _ y = yos;
_ Root ["char" + I]. text1 = myText. charAt (i-1 );
}

7. Right-click 2nd frames and 3rd frames respectively, select the insert blank key frame option in the pop-up shortcut menu, and insert two blank key frames.

8. Add the following action script statement to frame 2nd:

I = 1;
I = 1;
// Obtain the current mouse coordinate and convert the offset and rotation angle of each text in the ring
Xm = _ root. _ xmouse;
Nxm = (xos-xm)-4*(xos-xm)/6 * rspeed;
For (I; I <= myLength; I ++ ){
// Text farther away from the audience is smaller, and the transparency is smaller, resulting in a layered and three-dimensional sense.
Nxn = Math. cos (sineof + sb * I) * 100;
Xsubval = Math. abs (Math. cos (sineof + sb * I)/2) * 100 );
_ Root ["char" + I]. _ x = Math. sin (sineof + sb * I) * magnitude + xos;
_ Root ["char" + I]. _ alpha = xsubval;
_ Root ["char" + I]. _ xscale = nxn;
_ Root ["char" + I]. _ yscale = xsubval + 15;
}
Sineof + = nxm;

9. Add the following action script statement to frame 3rd:

GotoAndPlay (_ currentframe-1 );

10. Press [Ctrl + Enter] to test the animation effect.

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.