Portfolio of external animations

 

The goal is to import movies every 5s in a main movie and to center them in the main stage.

⇒ animation ⇐

We now gonna describe the different stages.

Creating external movies.

1 - Create 5 movies with sizes : 200x100, 100x200, 160x120, 300x200, 320x240.
Frame rate = 30.

2 - Fill them up with everything you want.

3 - Place the 5 swf in a directory named albumswf

Creating main movie

1 - Set up sizes 640x480. Frame rate = 30. Whatever backgroung color.

2 - Create an empty rectangle 640x480 as framework..

   

3 - Create a filled rectangle 640x40 as a zone to display title.

   

4 - Create a static text as label : Titre.

   

5 - Create a dynamic text to display the title. (variable name : txtdyn)

   

6 - Insert now a MovieClip in the stage. Name it Conteneur.

PHP Script

We need to get the name of external movies from their directory just as the total number of files.
Using your favorite text editor enter the following script :

The 3 variables 'll be retrieved by swf.
Notice the presence of variable fini as a flag to valdate completion of PHP script.

Main movie Script

The main problem is to center every imported movie.
Because we could know the sizes of imported movie ONLY when it has been entirely downloaded, we 'll use actionscript methods ( loader and listener )
For the very moment, Swishmax2 is unable to manage AS3, so we'll use old actionscript !
In Scene_1, enter :

Et voilà!

 


Si vous aimez le site

 

Select a language if you need :


Page chargée en 0.003 sec.

Dernière Modification : Mer 25 Janvier 2017 8:56
Copyright © 1999-2017 Jean-Paul Molina Tous droits réservés.

to Google