lol sorry i have been asking soo many questions lately. But i have another one if yall dont mind.
So i am working on a classcalled Particle.
it has alot of public vars that you use to set the behavior of the particles. It works well if i have one particle object but once i create 2 the variables all act like static. for example if i make object named particle1 and particle2.
if i put particle1.speed = 5; then say particle2.speed=10; it changed particle1 speed also…
example:
var part: Particle = new Particle();
part.quanityType = rate;
part.quanityRate = 1000;
part.speed=2;
part.speedVariation =2;
part.emitterx=200;
part.emittery=200;
part.objectType = “ticks”;
part.particleSize = 3;
part.directionCenter = 100;
part.directionDivergence=360;
part.particleLife = 200;
part.emitTime = 1;
part.startEmit();
var part2: Particle = new Particle();
part2.quanityType = rate;
part2.quanityRate = 1000;
part2.speed=5;
part2.speedVariation =100;
part2.emitterx=300;
part2.emittery=300;
part2.objectType = “square”;
part2.particleSize = 3;
part2.directionCenter = 100;
part2.directionDivergence=360;
part2.particleLife = 200;
part2.emitTime = 1;
part2.startEmit();
part1 takes properties of the second part 2.
inside my class all the variables are declared using this sytax:
public var propertyName:Number;
and soo on…
in my constructor i dont initialize them. can that be the problem?