AS3 Pretty Parabola Effect

AS3 Flash Multi Explosion Particles Fireworks

AS3 Flash Rain/Dripping with Splashes Code

Other effect options, dripping paint, liquid running down the screen etc

//rain or dripping water with splashes
//copy and paste
//look up any objects density (water has a density of 1) and drag coefficient (http://en.wikipedia.org/wiki/Drag_coefficient)
//changing the stage dimensions will not affect the code
stage.frameRate = 60;
// holds the droplet objects
var dropsVector:Vector. = new Vector.();
// holds the time for each droplet
var framesVector:Vector. = new Vector.();
// holds what the velocity is for each droplet
var velocityVector:Vector. = new Vector.();
// holds splash objects
var splashVector:Vector. = new Vector.();
// holds the time for each splash
var framesSplashVector:Vector. = new Vector.();
//holds splash velocity
var velocitySplashVector:Vector. = new Vector.();
//holds splash direction

AS3 Flash Particle Explosion (Firework Like)

Code: http://www.shacarah.com/portfolio/?q=node/132

Wasn't really going for fireworks, more just an explosion of particles... could easily be fireworks though.

AS3 Flash Particle Explosion Code

//doesn't need to be mouse trails, makes a nice explosion onMouseDown or enterframe

var particlesVector:Vector.<Sprite> = new Vector.<Sprite>();
var framesVector:Vector.<Number> = new Vector.<Number>();
var velocityVector:Vector.<Number> = new Vector.<Number>();
var xVector:Vector.<Number> = new Vector.<Number>();
var yVector:Vector.<Number> = new Vector.<Number>();
var targetX:Number = 0;
var targetY:Number = 0;
var gravity:Number = 9.8;
var density:Number = .8;
var airDensity:Number = 1.29;
var dragCoefficient:Number = 1.5;
var particleScaleMax:Number = 1;
var particleScaleMin:Number = .3;

AS3 Flash Particle Emitter Forces with Controls

Same basic idea as this code: http://www.shacarah.com/portfolio/?q=node/123

AS3 Sprite Particles Forces

Same basic idea as this code: http://www.shacarah.com/portfolio/?q=node/123

AS3 Flash Particle Code Concept of Applying a Force

//simple idea of a force using distance
//copy and paste nothing else

stage.frameRate = 60;
var particlesVector:Vector. = new Vector.();
var framesVector:Vector. = new Vector.();
var velocityVector:Vector. = new Vector.();
var numOfParticles:Number = 500;
var targetX = stage.stageWidth / 2;
var targetY = stage.stageHeight / 2;
var gravity:Number = 9.8;
var forceStrength:Number = .05;
var forceSize:Number = 150;
var forceSpeed:Number = .2;
var density:Number = .1;
var airDensity:Number = 1.29;
var dragCoefficient:Number = 2.1;
var particleScaleMax:Number = 2;
var particleScaleMin:Number = .1;
var timeCounter:Number = 0;

AS3 Flash Snow Unique Flakes

Wind force is the same basic idea as this code: http://www.shacarah.com/portfolio/?q=node/123

AS3 Flash Fall Leaves

Wind force is the same basic idea as this code: http://www.shacarah.com/portfolio/?q=node/123

Syndicate content