# Can anyone help me remove the particles?

**URL:** <https://forum.kirupa.com/t/can-anyone-help-me-remove-the-particles/292621>\
**Category:** flash\
**Created:** [July 16, 2009, 2:45pm UTC](https://forum.kirupa.com/t/can-anyone-help-me-remove-the-particles/292621 "2009-07-16T14:45:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![IanCremona](https://avatars.discourse-cdn.com/v4/letter/i/65b543/32.png) [@IanCremona](https://forum.kirupa.com/u/IanCremona)\
**Post date:** [July 16, 2009, 2:45pm UTC](https://forum.kirupa.com/t/can-anyone-help-me-remove-the-particles/292621/1 "2009-07-16T14:45:44Z")

</div>

```auto

function updateStage(event:Event):void {

    if (particles_ary.length<numOfParticles) {// check the amount
        //trace(numOfParticles);
        var moveAsset2:MoveAsset2=new MoveAsset2 ;// creat movieclip off instance
        var c:ColorTransform = new ColorTransform();
        c.color = (Math.random() * 0xFFFFFF);// color transform defintion http://www.kirupa.com/developer/as3/random_colors_as3.htm
        addChild(moveAsset2);
        moveAsset2.ribbon_mc.ribbon_mc.color_mc.transform.colorTransform=c;// access Mc properties
        moveAsset2.yVelocity = Math.floor(Math.random() * (maxVelocity - minVelocity)) + minVelocity;// round off the velocity number : Math.floor(Math.random() * (high - low)) + low;
        moveAsset2.x = Math.floor(Math.random() * (((stage.stageWidth - (moveAsset2.width))) - (moveAsset2.width))) + moveAsset2.width;// round off according to stage 
        particles_ary.push(moveAsset2);//push to array
    }
    if (particles_ary.length>numOfParticles) {
        trace("REMOVE RIBBONS!");
        
    }

    for (var i:uint = 0; i < particles_ary.length; i++) {//set repeat conditions for when particles go off stage
        var particle:MoveAsset2=particles_ary*;
        var c:ColorTransform = new ColorTransform();
        c.color = (Math.random() * 0xFFFFFF);
        particles_ary*.update();
        if (particle.y>stage.stageHeight+particle.height/2) {
            particle.yVelocity = Math.floor(Math.random() * (maxVelocity - minVelocity)) + minVelocity;
            particle.x = Math.floor(Math.random() * ((stage.stageWidth - (particle.width)) - (particle.width))) + (particle.width);
            particle.y=0;
            particle.scaleY = particle.scaleX = Math.floor(Math.random() * (3 - 0) + 0);

            particle.ribbon_mc.ribbon_mc.color_mc.transform.colorTransform=c;

            //trace("scale = " + particle.scaleX);
            if (particle.scaleX||particle.scaleY>1) {
                particle.alpha=Math.random()*.8+.2;
            }

        }
    }
}

```

Full code : [http://emotioned.com/2009/07/flash-cs4-as3-confetti-particle-system-source-files-and-class/](http://emotioned.com/2009/07/flash-cs4-as3-confetti-particle-system-source-files-and-class/)

Can anyone help me remove the particles?

thanks  
Ian
