View Full Version : Flash Particle Emitters
thePIN
11-05-2007, 03:32 PM
I need to make a particle emitter similar to this one here (http://www.levitated.net/bones/mxComponents/examples/FMXComp-particle-trace.html) but don't really know what to do... where to start etc..
it doesn't need to have the lines after it though they would be nice
i know some actionscript but not alot, ive tried de constructing it with swf quicker, but there are 2 pieces of code missing..
what i've got so far is, there are 2 bits each is a graphic in a movie clip in a movie clip ive got the code from swf quicker for each inside movie clip, but the outer ones it wont give me the code for.
any help would be appreciated
BLiZZaRD
11-05-2007, 04:00 PM
Start:
here (http://www.flashkit.com/movies/Effects/Eye_Candy/Particle-Katnap_K-11810/index.php)
Then..
understand particles (http://www.flashkit.com/movies/Effects/Quantum_-Agostinh-9115/index.php) get the particle engine from this zip file ;)
and then learn how to pen and mask and you will be set.
thePIN
11-05-2007, 04:02 PM
thanks blizzard :) ill give it a go
thePIN
11-06-2007, 12:03 AM
they have kinda helped... but i dont know which bit is the particle engine in the 2nd link... i think its this.. but could someone help please
function createParticle(x, y, angle, power) {
// create new object
var particle = new Object();
// assign position values
particle.x =x;
particle.y =y;
particle._initTime = getTimer();
particle.exploded = false;
particle.fArr = new Array();
// develop a random angle based on angle passed and the
// available spread defined earlier
angle = -angle;
// generate a random power value
power = -power/2+power+power;
// create vx and vy variables for
// movement using angle and power
particle.vx = Math.cos(angle)*power;
particle.vy = -Math.sin(angle)*power;
// return particle object
return particle;
??
BLiZZaRD
11-06-2007, 01:23 AM
That would be an engine to create particles, yes :)
thePIN
11-06-2007, 04:02 AM
thanking you :)
thePIN
11-07-2007, 04:08 PM
ok ive got it working, one last problem... what code would i need to be changing to make the paricles move slower?
BLiZZaRD
11-08-2007, 04:07 AM
the "power" variable holds the speed(it appears) you can do other math (or remove the second +power) for the speed.
thePIN
11-11-2007, 01:17 PM
just thought if you were interested, you can see the end result here (http://www.weh8design.com/dayinmylife)
BLiZZaRD
11-11-2007, 03:59 PM
That looks awesome! I like how washing makes you awake and cheerful, but getting dressed puts you asleep and depressed, LOL. I know the feeling.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.