Bouncing ball

 

The goal is to show a ball, falling, boucing and falling at end.
It 's basically a script and a good understanding of progamming is required. setInterval method 'll be used.

⇒ animation ⇐

We gonna describe the differents stages right away.

Creating Objects

1 - Set up Movie size 640x480 (background color #000033).
Frame Rate 100.
Be sure in Export, Mask off-stage objects is toggled.

2 - First, the ground.
First, create the external rectangle 400x80 with a linear gradient color. Anchor point : Top Left.
Name it sol.
Watch out following images :

transform    target

3 - Then, a circle (diameter 100) with a radial gradient color.
Anchor point : Bottom Center. Name it balle.
Watch out following images :

transform    target

SwishMax Script

Here is the script for Scene_1

"Et voilà" , that 'it.

 


Page chargée en 0.001 sec.

Dernière Modification : Sam 14 Octobre 2023 9:48
Copyright © 1999-2024 Jean-Paul Molina Tous droits réservés.

 

to Google