/* ************************************************ EXAMPLE: Hello World AUTHOR: Richard Leggett CREATED: September 23, 2005 MODIFIED: September 23, 2005 Flash® by Example http://www.ifbin.com ************************************************ */ /** * Very simple "Particle" class. For a better particle class * see IFBIN author Keither Peters' version at: www.bit-101.com */ class Particle extends MovieClip { public var vx:Number = null; public var vy:Number = null; public var grav:Number = null; /** * Applies velocities and gravity on the X and Y. */ public function updatePosition() : Void { _x += vx; _y += vy += grav; } /** * Removes the particle. */ public function destroy() : Void { this.removeMovieClip(); } }