All flash Web site production Analysis-2

Source: Internet
Author: User
Tags contains final html page
   2, the production of loading
Considering the speed of the network transmission, if the index.swf file is large, it is necessary to design a loading to guide the viewer to wait patiently before it is fully imported. At the same time the design of a good loading at some time can also be a certain cushion for the site role.
The general practice is to first loading into a MC, the final position of the scene to set the label such as end, through the ifframeloaded to determine whether the download has been completed, if the download is completed through the gotoAndPlay control of the entire flash playback.
Take a loading file as an example and insert the MC into the scene:
Ifframeloaded ("End") {
gotoAndPlay ("Place to start playing");
}
   3. Text Import
In our production of the whole flash site often encountered a certain amount of text content needs to be reflected in the content of the text and the process described above is the same, different places to reflect the final performance and treatment methods are still a little different.
Method One, text graphic method
If the text content is not much, there is a hope that the text content to do more dynamic effect, you can use this method. You will need the text to make a number of flash components, arranged in the appropriate location. The document loading of the text graphics method is similar to the approach described above, and the principle is almost the same. The concrete dynamic effect waits for everybody to consider, here does not have much introduction.
Method Two, Direct import method
Text Import method can be independent of the TXT text file, through the Loadvariables import into the Flash file, modified only need to modify TXT text content can be implemented flash related file modification, very convenient.
Set VAR: variable name in text Box properties (note this variable name).
Add ActionScript code to the frame where the text box is located:
Loadvariables ("variable name. txt", "");
Write a plain text file. txt (random file name), the text begins with "Variable name =", "=" after the formal text content.

   Iii. Analysis of the case-making
General production process:
Web site Structure Planning-> flash scene planning-> material preparation-> separate-> integral integration
   1, this example website structure planning
Website column: News, about, e-mail, Gallery, cartoon, Animation
Sub-column about:feiying is, member, relationship, contact Us

The red Line part of the home scene (stage), each sub-column in the home page only keep the name, attributes for the button.
The Blue Line part of the content for the second scene (actor), can be done in a secondary scene content in a file, but also can be made into several independent files, as required to import into the home scene (stage).
   2, the first scene index.swf production
All flash site from home scene, child scene, second son scene ... Constitute.
and the production of HTML site similar, generally we will make a home scene index.swf, the main content includes: The aspect ratio, the background, the column navigation button, the website name and so on "homepage" information. Finally publish into an HTML file, or make an HTML page of your own, the content is a table, which is written in index.swf embedded code.
Main scene Arrangement:

The Blue Line section is the site name, copyright, and other fixed information areas, usually in the location of the edge of the Flash animation position.
The Orange Line content is the website column navigation button, usually also is fixed in an area. The button can be made static or dynamic according to the need, and can even be made into a button containing the change of MC.
The Green Line section imports the demo area of a child file for the main scene.
The main use of sub-file loading: loadmovienum, unloadmovienum Two control functions, see the previous important ActionScript code control.
Here we take the production of sub-column cartoon as an example. The main scene file index has a button cartoon, when we click on the cartoon button, we want to import the cartoon folder under the 200208.swf file. So we select the cartoon button in the scene and add the action code:
On (release) {
Loadmovienum ("cartoon/200208.swf", 1);
Unloadmovienum (2);
}
Notice here we set the level to 1.
   3, the production of the second scene 200208.swf
Now determine the file 200208.swf that the cartoon needs to import, and the file plan contains 5 sub files. So the 200208.swf file interface contains only 5 graphic buttons and a caption for importing 5 separate subfolders.
As you can see from the diagram, the 200208.swf file contains 5 small icons with buttons, bu_2_frog01 to bu_2_frog05 respectively. The effect we need is: Click on them to import the corresponding file 200208_frog01.swf to the 200208_frog05.swf file respectively.

We select Bu_2_frog01 in the scene and add ActionScript for this button:
On (release) {
Loadmovienum ("cartoon/200208_frog01.swf", 2);
}

Click Bu_2_frog02 to add ActionScript for this button:
On (release) {
Loadmovienum ("cartoon/200208_frog02.swf", 2);
}
......
Set the corresponding action of the 5 button individually to invoke the corresponding file.
Note: Here we set the level to 2 to preserve and distinguish the number of levels of imports set by the main scene 1, and if you need to import the layers at the next level, increase the number of layers to 3, and so on.
   4, two level of the scene (200208_FROG01~200208_FROG05) production
The two-level scenario here is the content associated with the superior, and is the last level in the three-level structure in this example. This level is mainly for all Flash website specific Content section, can be detailed picture, text, animation content. What you need to connect to is a specific picture, but you need to make a SWF file that is equal to the main scene. For example:
 
The scene is the bottom of the scene, for the main content of the Display section, the specific animation effect you can do as much as needed to do more in-depth. Note To add the stop ActionScript code at the last frame of the scene: Stop (); This stops the looping action of the scene animation.
Effects of full import into the main scene:



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.