Unit 16. Generating and Publishing Movies (I)


Considerations on the size of the movies

 

Before we try to publish our movie to show it to others, especially at a Web page where the size of download is vital, we must consider the following aspects:

 

    CONSIDERATIONS IN THE DRAWING:

              Although the gradient are very showy, it also requires much more memory, because of that we must avoid its excessive use as much as possible.

              The pen tool takes more memory than the rest of the drawing tools, so we might have to choose these last ones not as often as possible.

              We've seen that the animation of lines is rather useful. But the use of lines that defined by the user can cause that the size of the download increases. Therefore avoid the discontinuous, dotted lines ...

              Drawing curves with a minimal number of nodes.

 

    CONSIDERATIONS IN THE ORGANIZATION:

              Group the objects related with the command Modify → Group.

              If we've created an object that is going to appear several times, we'd have to convert it to symbol, Flash will place it in the library and, whenever you want to show the symbol make reference to an only position of memory.

              We've already commented the greater size of the bitmaps. W e must decrease the number of their appearances in our movie.

 

    CONSIDERATIONES IN THE TEXTS:

              We've been able to see that when we open the menu of letters type, the first three letters are always "_ sans", "_ serif"   and "_ typewriter". This isn’t by chance. They are placed there to take a minimum of memory by these fonts that's why their use is recommended.

 

    CONSIDERATIONS IN THE ANIMATION:

              Use as often as we can the movement interpolations and the guides to reduce the number of keyframes and the movie size.

              Avoid the use of the interpolation by form or color change for animations, when it is possible.

   

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.

              

Preloading. Loading the entire Movie before its reproducing

 

  Preloading is mainly used to induce the partial load of the movie, while its reproducing; so when the movie is of a considerable size it doesn't cause it to seem to be cropped.

     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.

Distributing swf-like file to an autonomous player

 

   In order to be able to distribute movies created in Flash, there are necessary two actions: to create a SWF file and propose the installation of the Flash Player for someone who wants to visualize it.

      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:

Version: If we want to publish our movie so that it is seen with previous versions of Flash, we must select here the desirable version.

Load Order: Here we indicate the order in which we want the document to be loaded.

  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.

ActionScript Version: The use of ActionScript 2 will allow us to use the new features relative to objects, classes etc... If our movie uses only simple actions we can leave in this tab the option ActionScript 1.0

Generate size Report: We've used this option in the previous section. If we activate it, a text file with a detailed relation of the document size will be created.

Protect from Import: Activating this checkbox we'll obtain that when another user (or we) wants to import it we can’t or must introduce a password if some has been chosen.

Omit trace actions:  The trace actions are used to verify the correct operation of the movie during the creation of this (during the tests).

Debugging Permitted: It allows that file SWF can be debugged. It also demands the introduction of a password since a permission of the creator is necessary to Import the file and debug it.

Compress movie: Compress the movie as much as possible.

JPEG Quality:  If we haven't indicated a concrete compression in the bitmap properties panel, here we can determine its compression degree, that will determine the space token in memory by this type of images. The greater compression, the lesser space in memory that the image will take, but its quality also will be smaller.

Establish Audio Stream or Audio Event: This option allows us to access to the Panel "Sound Settings" from where we can set characteristics for each type of sounds.

Override sound settings: Having this the selected compression levels for each sound file of our document will be overrided.

 

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.
© aulaClic. All rights reserved. Reproduction in any form whatsoever is prohibited.
November-2005.