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à!

 


Member of the Anti Hacker Alliance

Select a language if you need :


Page chargée en 0.001 sec.

Dernière Modification : Mar 8 Octobre 2019 10:43
Copyright © 1999-2019 Jean-Paul Molina Tous droits réservés.

to Google