# Particle

**URL:** <https://forum.kirupa.com/t/particle/244962>\
**Category:** programming\
**Created:** [November 24, 2007, 4:34am UTC](https://forum.kirupa.com/t/particle/244962 "2007-11-24T04:34:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fw2803](https://avatars.discourse-cdn.com/v4/letter/f/e5b9ba/32.png) [@fw2803](https://forum.kirupa.com/u/fw2803)\
**Post date:** [November 24, 2007, 4:34am UTC](https://forum.kirupa.com/t/particle/244962/1 "2007-11-24T04:34:22Z")

</div>

Hi there  
I am currently working on particle systems. To start with, I make a system with only 1 particle. Yes… only 1. You will see what the problem is when you run the script. I put a smoke particle on the stage and use duplicateMovieClip() to get it to place. I’ve put the following codes to it:

```auto

onClipEvent (enterFrame) {
  if (_name != "smoke") {
    this._x += Math.floor(Math.random()*10-5)
    this._y -= Math.floor(Math.random()*10-5)
    this._xscale += 2
    this._yscale += 2
    this._alpha -= 2
    if (this._alpha <= 0) {
      this.removeMovieClip()
    }
  }
}

```

As simple as that… and I put:

```auto

count = 0
onEnterFrame = function() {
  count++
  _root.duplicateMovieClip("smoke"+count,getNextHighestDepth(),{_x:100+Math.floor(Math.random()*10-5),_y:100+Math.floor(Math.random()*10-5)})
}

```

to the first frame. And you see the effect… It’s hard to describe. It’s… just not working as expected. It is supposed to be a smoke from top-down view. But it seems that there is only one particle vibrating… What’s the problem…
