|
Unit 16. Generating and Publishing Movies (I) |
|
CONSIDERATIONS IN THE DRAWING:
CONSIDERATIONS IN THE ORGANIZATION:
CONSIDERATIONES IN THE TEXTS:
CONSIDERATIONS IN THE ANIMATION:
Apart of the optimization that we do, sometimes it is impossible to avoid increasing the movie size. It is recommended then to make a preloader when the size of the movie exceedes 80KB.
|
|
Normally, preloading are made with showy effects to entertain the observer and present the option to visit our Web. Usually they have some simple animations. It can be much more complicated, but we’ll make a simple one to understand well the concept, and simple way to do it. We will start as we already had finished our movie. If we want to know its size we can go to File → Publish Settings select the Flash tab, and check the box Generate Size Report . If we press the button Publish, a text file will appear in our directory where the size of our movie is explained in details. |
|
|
Now we'll insert a new scene (Insert → Scene). It will have to be executed first. In order to make sure of this we go to Window → Design Panels → Scene and in the window that appears we drag the scene to the top. In our example we have called it "Preloader" and have supposed that the Scene with the movie is called "Movie" (logically). It will have to be something similar to which the image shows. In the just created scene we'll insert another layer, in such a way that we have left two layers that we will call, "Action" and "Load". We'll create a simple animation in the layer "Load". For example, a the title that tells "Loading..."; you can always apply the preferable animation to it, that isn't very difficult. |
|
In the layer "Action" we’ll design the preloader "heart". Let’s make that the animation of our load scene is executed repeatedly, until the scene that contains the main movie has been loaded. For it we will open the panel of Actions. Let's select the last frame and introduce the action gotoAndPlay(), place the cursor within the parenthesis and introduce the scene and the frame where it will have to go after executing this action. In our case we want to go to the frame 1 of the scene "Movie", so we will write the following: gotoAndPlay("Movie", 1); Now we select the frame before the last one, here we will prevent arriving to the last frame when the movie hasn’t been loaded completely yet. In order to do this, we chose the action _framesloaded (loaded frames) and the action _totalframes (total frames) and we indicate in the actions panel what we want to do. It would be something like "When the number of loaded frames is greater or equal to the total number of frames, then we start to play the movie" (although it is theoretically impossible that total number the loaded frames is greater than the total number of frames, we will include this condition just in case Flash internally enters frames in a different way). We could write something similar to what the image shows: |
![]() |
|
Having this, we cause that the text "load” appears in the template and while its animation plays, we'll be verifying periodically if the main movie is loaded entirely, if it isn't we'll continue showing the text "load" until the verification that we do in the last frame indicates that our movie has been loaded. Then, we'll leave the preload animation junping to the last frame, that contains the action, which will take to us to play the movie. And that's all that we have to do to create a preloader (although certainly it can be made more sophisticated), so that the visitors already will not flee from our Web. |
Flash provides several options and functionalities for the creation of a SWF. These options can be seen in the panel of Publish Settings, to which we can accessin the menu File → Publish Settings (Flash Tab). Let 's see these options:
If we select Bottom up the content of the inferior layer will be loaded firstly (from the layer 1 until the last layer that we have in the document). By the opposite, if we select Top down first the content of the superior layer will be loaded (from the last layer that we have in the document until the first layer). This command is important due to the fact that the Flash property is reproducing the movie as far as the objects are loaded. Thus, we are interested that some objects appear before others.
|
|
To understand better this concept we recommend to you to do the Exercise Publish SWF
|
| |
|
Legal warning: Authorised on-line use only. It is not allowed the use of these courses in companies or private teaching centres.
|