Current location - Education and Training Encyclopedia - Resume - Who knows the flash webpage making tutorial?
Who knows the flash webpage making tutorial?
Brief Analysis of Flash Website Making

After learning Flash for a period of time, many friends became interested in making all-Flash websites. All-Flash website is mainly based on graphics and animation, so it is more suitable for those applications with less text content and mainly graphics and animation effects. Such as: corporate brand promotion, specific online advertising, online games, personalized websites, etc.

Making an all-flash website is similar to making an html website. You should first draw a structural diagram on paper, including: the theme of the website, what elements to use, which elements need to be reused, the relationship between elements, how to move elements, what style of music to use, how to divide the whole website into several logical blocks, whether you plan to use Flash to build the whole website or just as the early part of the website, and so on. These should be considered.

From a technical point of view, if you master many methods of making a single Flash and know more about the calling methods between swf files, it will not be too complicated to make a complete Flash website.

Reference process: website architecture planning > Flash scene planning->; Material preparation-> separate production-> overall integration

First, the difference between a full Flash website and a single Flash work.

Second, the common technology

1, important ActionScript code control

2, production loading

3. Text import

Third, the analysis of example making.

1. The website structure planning of this example

2. Make the homepage scene index. swf

3. Make secondary scene animation (200208.swf)

4. Making secondary scenes (200208 _ frog01~ 200208 _ frog05)

5. About Text Import in

Fourth, matters needing attention

Above, we briefly introduced the basic methods of making all-Flash websites by analyzing examples, hoping to give some real help to friends who like Flash, and look forward to seeing the wonderful Flash websites made by everyone as soon as possible! Download the source file of this Flash website instance.

First, the difference between a full Flash website and a single Flash work.

1, different file structures

The scene, animation process and content of a single flash work are all in one file, while the files of all Flash websites are composed of several files, which can be continuously expanded with the development needs. The file animations of all Flash websites are in their corresponding files. The animation effect is achieved through the import of actions and the control of jumps. Because multiple SWF files can be loaded at the same time, they will be displayed overlapping on the screen.

2. Different production concepts

The production of a single Flash work is usually in an independent file, so it is enough to plan the animation effect with the change of time axis or the alternation of scenes. The production of all-flash website needs to be grasped as a whole, and the dynamic effect of all-flash website can be realized by switching control of different files, which requires producers to have clear ideas and good production habits.

3. The file playing process is different.

A single Flash work usually needs to make all the files in one file, and the viewing effect is that it cannot be played until the files are basically downloaded. The full flash website is made up of several record group, which is more in line with the characteristics of Flash software products in terms of time flow. Files can be made smaller, and by loading other files one after another, it is more suitable for the spread of the Internet, so as to prevent visitors from giving up browsing because of waiting too long.

Second, the common technology

1, important ActionScript code control

This is the key to the realization of all flash websites, especially FlashMX has added many powerful commands. Please refer to other materials for this part. This paper only introduces some important ActionScript functions that need to be used to make all flash websites.

LoadMovieNum("url ",level [,variable])

LoadMovie("url ",level/target [,variable])

Function description:

Load SWF or JPEG files when playing the originally loaded movie.

Parameter description:

Url the absolute or relative URL of the SWF or JPEG file to be loaded, and cannot contain a folder or disk drive description.

Level loads the swf file into the movie as a layer. If layer 0 is loaded, the loaded swf file will replace the currently playing movie. Layer 2 is higher than layer 1.

Target can obtain and replace the target MC with a path selector, and the loaded movie will have the position, size and rotation angle of the target MC. (Personally, it is better to use Target, which is more convenient to control the loading position. swf)。

Variables are optional parameters, and the websites specified for sending variables are similar. Generally, we will make a main scene index.swf, which mainly includes "home page" information such as aspect ratio, background, column navigation buttons and website name. Finally publish it as an html file, or make your own html page. The content is a table in which the embedded code of index.swf is written.

Main scene layout:

The blue line is a fixed information area such as website name and copyright, which is usually located on the edge of Flash animation.

The orange line content is the navigation button of the website column, usually fixed in a certain area. Buttons can be made into static or dynamic effects as needed, even a button containing MC changes can be made.

The green line part is the demonstration area of the main scene import subfile.

The two control functions, LoadMovieNum and UnloadMovieNum, are mainly used to load subfiles. Please refer to the important ActionScript code controls mentioned above.

Here we take making column comics as an example. There is a button cartoon in the main scene file index. When we click the cartoon button, we want to import the 200208.swf file in the cartoon folder. So we choose the cartoon button in the scene and add the action code:

Open (release) {

LoadMovieNum ("Cartoon /200208.swf",1);

unloadMovieNum(2);

}

Note that here we set the level to 1.

3. Making the second scene 200208.swf

Now determine the file 200208.swf that needs to be imported into the comic sub-column, and it is planned to contain 5 sub-files. Therefore, the interface of 200208.swf file only contains five graphic buttons and a title for importing five independent subfiles.

200208.swf

As can be seen from the figure, the 200208.swf file contains five small icons with attribute buttons, namely Bu_2_frog0 1 to Bu_2_frog05. The effect we need is that clicking on them will import the corresponding file 200208_frog0 1.swf into the file 200208_frog05.swf respectively.

We select Bu_2_frog0 1 in the scene and add ActionScript to this button:

Open (release) {

LoadMovieNum ("Cartoon /200208_frog0 1.swf", 2);

}

Click Bu_2_frog02 to add ActionScript for this button:

Open (release) {

LoadMovieNum ("Cartoon /200208_frog02.swf", 2);

}

Set the corresponding actions of the five buttons to call the corresponding files in turn.

Note: We set the level to 2 here to keep and distinguish the layers imported in the main scene 1. If you need to import the next level of layers, increase the number of layers to 3, and so on.

4. Making secondary scenes (200208 _ frog01~ 200208 _ frog05)

The secondary scene here is the content associated with the superior, which is the last level in the three-level structure in this case. This level is mainly the specific content part of the all-flash website, which can be detailed pictures, text and animation content. What needs to be connected here is that the specific picture is the content, but it also needs to be made into a swf file with the same scale as the main scene. For example:

200208_frog0 1

200208 _ Frog 02

This scene is the lowest scene and the main content display part, and the specific animation effect can be further deepened as needed. Note that the stop ActionScript code should be added to the last frame of the scene: stop (); This can stop the loop action of the scene animation.

The effect of completely importing into the main scene.

5. About Text Import in

Look at the About sub-column in this example, and set the action of the About button in the index.fla file:

Open (release) {

loadMovieNum("aboutus.swf ", 1);

unloadMovieNum(2);

}

Make a text box to display the text in the file aboutus.fla, and set the property of the text box to multiline, var: about us (pay attention to this variable name).

Add ActionScript code to the frame where the text box is located:

loadVariables("aboutus.txt "," ");

Write a plain text file about.txt in the directory where the file aboutus.swf belongs, with the text beginning with "aboutus=" and the formal text content written after "=".

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

Fourth, matters needing attention

1. Pay attention to the length and width of all subfiles.

All-Flash website is very similar to Photoshop's layer structure from the picture level. We can think of each sub-scene as a layer file, and the sub-file appears in the length and width range of the background. In order to facilitate positioning, we can keep the subfile and the main scene in a uniform aspect ratio, which is very convenient for layout. Otherwise, you must carefully control their positions using the setProperty statement.

2. Pay attention to publishing html options as transparent mode when publishing files.

The reason why you need to publish each subfile in transparent mode is that you can't make the subfile have a background color. Because the aspect ratio of the subfile is basically the same as that of the main scene, if the subfile has a background color, it will cover the content of the main scene.

Setting method: Check the html option in the publishing settings, and select the window mode: transparent without window 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 "String = body with the same name as the Var definition in the text box property". In addition, the swf file and the txt text file that need to be imported should be in the same directory.

4. Pay attention to carefully check whether the calls between files are correct and avoid "dead links".