Web site produced with Flash skills
Related Tags:
Now that we see a lot of online FLASH website, in the production of FLASH site is the call by the majority of other SWF files so that we can make Clear the structure of the web site to facilitate our management FLASH web site, and we are also relatively easily produced , because to do so would be like as we develop software using the modular thinking! facilitate our development piece. Today, we gave this talk about specific skills.
Demo animation effects:
Click here to download the package source files (of five)
The Basic idea of production:
We are making every SWF an independent animation, and both have their own standstill frame, when the film automatically loaded after loading the first animation, animation began loading the first set and the middle frame pause, when we Click on the button when the other loading other animation, and be stalled in the middle. In this system uses two main variables: midframe and _ root.currMovie.
Midframe each of the first frame animation of the first set, which is the first animation specified which began in the middle frame standstill. When the first click of a button, tell us is the current frame, and after the campaign must be called animation at the midframe. Of course, the show was just a simple example, you own the actual production process can be made more complicated.
_root.currMovie Referring to the current frame, it is created by the root _ mainly from the animation to create.
Production steps:
1. Creation of four buttons, respectively named section1, section2, section3 and section4. Of course, you in the actual production process can be named as main, about, work, etc. conact.
2. Creation of a new video clips, named container, the movie clip is empty! Then it dragged on stage. We passed the empty film clips to call other SWF files. This is a crucial place. After creating good to be placed in a container in layers, and then we build a new layer to the establishment of the four buttons have dragged the layers, as shown:
3. Below we have selected the stage in the container and pulled out the film, to name one example of the name, so that we can use the code calls ah! Figure:
4. Choose the first button, and then open the action by pressing F9 panel began settings button click action, enter the following code:
On (release) (
If (_root.currMovie == undefined) (
_root.currMovie = "Section1";
Container.loadMovie ( "section1.swf");
) Else if (_root.currMovie! = "Section1") (
If (container._currentframe> = container.midframe) (
_root.currMovie = "Section1";
Container.play ();
)
)
)
Note: If your points are produced by SWF main.swf code is amended to read as follows:
On (release) (
If (_root.currMovie == undefined) (
_root.currMovie = "Main";
Container.loadMovie ( "main.swf");
) Else if (_root.currMovie! = "Main") (
If (container._currentframe> = container.midframe) (
_root.currMovie = "Main";
Container.play ();
)
)
)
5. Accordance with the above methods to add the other three buttons corresponding action scripts.
Note: in order to produce results indicated that this must be the main documents and other on the same directory!
6. If we want to make the animation loading first animation shows a need to add a layer, and then add the following to the first frame code:
Common code:
_root.currMovie = "Your_first_section_name";
Container.loadMovie (_root.currMovie. "Swf");
Here, we use the following statement:
_root.currMovie = "Section1";
Container.loadMovie (_root.currMovie. "Swf");
7. Below briefly talk about the animation production methods:
(1) Create a simple introductory animation, in two layers: an animation layer, the other one is the code layer, to do animation, to take into account the middle frame, Figure:
(2). Choice in the middle frame animation, and remember it to churn, and then in the middle frame the importation of action: stop (); Figure:
(3). Then return to the first frame, set for action:
Midframe = 78;
(4). Final choice of action following a set script:
_root.container.loadMovie (_root.currMovie. "Swf")
Finally added: because we use Flash production site, and sometimes it will inevitably slow network speed ratio, then we can make a loading effect! Is for each animation loading method is very simple, just add the two frames! At this time we should pay attention to midframe has changed, the attention can be diverted under!
First frame script:
Midframe = [yourupdatednumber];
Bytes_loaded = Math.round (this.getBytesLoaded ());
Bytes_total = Math.round (this.getBytesTotal ());
GetPercent = bytes_loaded / bytes_total;
This.loadBar._width getPercent * = 100;
This.loadText = Math.round (getPercent * 100) "%";
If (bytes_loaded == bytes_total) (
This.gotoAndPlay (3);
)
The second frame script:
This.GotoAndPlay (1);
Good! This article introduce you to the end, we would like to help!
- Div borders
- CSS site layout div highly adaptive - Discuss
- How DIV never placed in the web site of the window express as Bottom
- On the hidden div
- DIV and Layer
- Fillet div
- Div + css ? ? ?
- Div ? ? ? ¨°
- DIV CSS layout examples: css layout of the site ten steps Record! (Directory)
- Div layer
- CSS: ? ? ? ?div ? ?
- DIV center
- DRAG the DIV
- XHTML compliant standards DIV + CSS layout of the site, the impact on the SEO!
- DIV and Table layout in the availability of relatively large site
- DIV father DIV relative to the bottom of the alignment method
- What is DIV?
- Div attribute
- DIV
- Div ?asp.net ? ?




