Lit up Xmas tree

 

The goal is to light up a Christmas tree using the previous example.

⇒ animation ⇐

We now describe the different stages.

Creating Objects

1 - Set up movie sizes 320x376.
Frame rate = 50.

2 - Insert image.

3 - Copy and paste movieclip star from previous example.
Reduce scale to 10%.

Script

All stars 'll be inside a triangle which vertices are : summit (x1,y1), bottom right side (x2,y2) , left bottom side (x3,y3).
From an random coordinate y, we 'll yield the corresponding x limits of an horizontal segment.
Enter following script in Scene_1 :

Et voilà !

Remark :
you need to put eval("star"+i) in SwishMax2, not ("star"+i)

 


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