- Home
- Tutorials
- Flash
- Intermediate
- Bouncing ball with particle effect and wind

The particles
Alejandro Quarto
Partner, Software Development/General Manager at Persuasive Games. In his role, Mr. Quarto is responsible for software development and testing, as well as studio management and strategy.
Prior to joining to Persuasive Games, Mr. Quarto started his career in interactive entertainment as a freelance programmer using different object-oriented programming tools specifically specializing in Macromedia Flash, Shockwave, and Java development platforms among others. In 2002 Mr. Quarto co-founded Platico Games! in Buenos Aires, Argentina. While at Platico Games Studio, Mr. Quarto produced a wide variety of video game projects including: advergames, educational games, and multiplayer games oriented to big communities.
These games have been developed for clients such as: Claxson Interactive Group, Budweiser, Mattel, Turbo Video Brazil, Canal 13 (TV) Argentina, and FM HIT in Chile.Â
Quarto is currently teaching about Flash development, in an institute located in Buenos Aires. In his role as instructor, he teach how to develop webs and games, for online content. Personal Blog: http://www.alejandroquarto.com
this.onEnterFrame = function() { distance=Math.sqrt((Math.pow(_alpha-0,2))+(Math.pow(_alpha-0,2)))/5; _alpha-=distance _xscale-=distance/4 _yscale-=distance/4 if(_alpha<1){ this.removeMovieClip() } }
On every frame, we do the distance calculation from the actual movie's _alpha, to 0. Using this distance we reduce the scale and the transparency. If the alpha is near to 0, we just remove the movie.
Note that if you change the "5" and "4" values, particle life time will change. Here you can play with all the movie properties and also add frames for better effects.
That's all! This is not the most realistic way, but is a good approach to a simulation with a few lines of code.
You can get more examples at my blog: www.alejandroquarto.com
Attached source code at the end of the page.
Spread The Word
Related Links
Attachments
6 Responses to "Bouncing ball with particle effect and wind" 
|
said this on 03 Jan 2008 3:30:14 AM CST
Did not specify where to
|
|
said this on 31 Jan 2008 6:04:13 PM CST
This was great, WHEN I fi
the second goe and the t I hope this makes sense |
|
said this on 12 Nov 2008 2:51:00 AM CST
Wooow! I like it .Thankx
|
|
said this on 11 Dec 2008 5:54:49 AM CST
A brilliant action script
|
|
said this on 12 Dec 2008 2:15:11 PM CST
Thanks for all the commen
For all of you that |
|
said this on 08 Apr 2009 11:26:19 AM CST
I'm still not sure where
|


Author/Admin)