All flash Web site production Analysis-3

Source: Internet
Author: User
   5, about the text import
View the About sub column of this example and set the action on the About button in the file Index.fla:
On (release) {
Loadmovienum ("aboutus.swf", 1);
Unloadmovienum (2);
}
In the Aboutus.fla file, make a text box that displays text, set the text box property to Multiline (Multiline), and var:aboutus (note the variable name).
Add ActionScript code to the frame where the text box is located: Loadvariables ("Aboutus.txt", "");
Write a plain text file in the directory of the aboutus.swf file About.txt, the text begins with "aboutus=", and "=" is followed by the formal textual content.

The effect of importing a text file into the main scene completely:

   Iv. Matters of note
1. Note the long and wide properties of all the files
All flash site from the screen level, very similar to Photoshop layer structure, we can see each child scene as a layer file, the child file is in the context of the long range of appearance. In order to facilitate positioning, we can make the child file and the main scene to maintain a uniform height-to-width ratio, so that the layout is very easy to arrange. Otherwise, you must carefully control their position with the SetProperty statement.
2. Notice that the HTML option is published as transparent mode when you publish the file
The reason that you need to publish each subdocument as transparent is because you cannot have the background color of the child file, because the child file's height-to-width ratio is basically the same as the main scene, and if the sub file has an undertone, it obscures the contents of the main scene.
Setting method: Check the HTML option in the Release settings, select Windows Mode:transparent windowless in the HTML panel, as shown in the figure.

3. When using text import, note that the content at the beginning of the text file must be "the same string = body as the var definition name in the text box property." In addition, the SWF file that needs to import text is preferably in the same directory as the TXT text file being imported.
4, pay attention to carefully check the file between the correct call, to avoid the "dead link."

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.