Flash MX Highlights Text (scrolling text box and dynamic text)

Source: Internet
Author: User
Tags format control characters root directory
Dynamic | text box

Scrolling text Box

Component is a new feature for FLASHMX. After introducing the concept of a component (Component), you can customize common program interfaces, including scroll bars, hypertext fields, input buttons, radio buttons, multiple-selection buttons, lists, and check boxes. These greatly accelerate the development progress. Now let's see how you can customize the scrolling text box with components.

1, select Window->components, the property panel appears. (Figure 9)



The scrollbar is the component we want to use.

2, drag a component scrollbar to the scene. If you let it go with the text box, it will automatically grow as long as the text box. The adsorption method is to click View and select Snap To Objects, where the label target in target TextField can be seen in the component scrollbar: Poems. (Figure 10)



If ScrollBar is not in line with the text border, you need to write the label Target:poems in the component's property bar (This step is also important). In addition the request ScrollBar put on the 2nd fill.

1. So you can easily read the entire contents of the poem, Ctrl+enter test the overall effect. (Figure 11)



Drag the scroll bar to see all the content of the poem, and the style of the scroll bar can be customized by the user himself. Several methods of solving the text require us to choose carefully according to the practical application. Learning, but also to play their own imagination, to do extrapolate, learn to accumulate and classify, open ideas, solve problems will be leisurely.

   dynamic text (call external file dynamic)

Direct transfer into external poems.txt text files will make the production more flexible.

1, create a text box, give this text box a variable txt.

2, Text Format selected as: Dynamic text.

3, select multiline multiple line input.

The three steps above are done in the Text Properties panel. (Figure:)



4. Increase the scripting language on the first frame. Click the right mouse button->action frame panel. Actions->browser/network->loadvariables. Enter the parameter values in the panel. (Figure:)



You can also enter in expert mode directly:

Loadvariablesnum ("Poems.txt", 0); The poems.txt in parentheses is the path, and 0 is the root directory in the scene, that is, at the home scene.

5, open poems.txt file, enter txt= in Notepad ..., write a poem by yourself. (Figure:)



After writing, you need to do format conversion, this is because the Flash MX support Unicode encoding format, so before loading into the scene need to convert the text file poems, Win2000 Notepad has this function, in the save when the "Save as" on it.

Special note: to the poems.txt and Flash MX generated files poems.swf in the same file directory, so as to ensure the normal display of dynamic text poems.txt.

Introduction to Unicode Encoding: A collection of all major instruction files in the world, including common word sets used by businesses and PCs. When you store files in Unicode format, you can use Unicode control characters to assist in the text coverage of the language, such as Arabic, Hebrew. When users enter text with Unicode characters in Notepad and save the file, you are prompted to select the Unicode encoding in "Save as" so that the characters are not lost. The partial Windows2000 font cannot display all Unicode characters. If you find that some characters are missing from the file, simply change them to a different font.

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.