# My class vars acting like static

**URL:** <https://forum.kirupa.com/t/my-class-vars-acting-like-static/173683>\
**Category:** Uncategorized\
**Created:** [December 28, 2005, 5:04pm UTC](https://forum.kirupa.com/t/my-class-vars-acting-like-static/173683 "2005-12-28T17:04:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mad\_man](https://avatars.discourse-cdn.com/v4/letter/m/58956e/32.png) [@mad\_man](https://forum.kirupa.com/u/mad_man)\
**Post date:** [December 28, 2005, 5:04pm UTC](https://forum.kirupa.com/t/my-class-vars-acting-like-static/173683/1 "2005-12-28T17:04:46Z")

</div>

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?
