# Why do my particles stop falling :(

**URL:** <https://forum.kirupa.com/t/why-do-my-particles-stop-falling/302082>\
**Category:** flash\
**Created:** [December 21, 2009, 4:55pm UTC](https://forum.kirupa.com/t/why-do-my-particles-stop-falling/302082 "2009-12-21T16:55:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZebraMan](https://avatars.discourse-cdn.com/v4/letter/z/aca169/32.png) [@ZebraMan](https://forum.kirupa.com/u/ZebraMan)\
**Post date:** [December 21, 2009, 4:55pm UTC](https://forum.kirupa.com/t/why-do-my-particles-stop-falling/302082/1 "2009-12-21T16:55:46Z")

</div>

Hey all,

Been helped a lot already on this forum wich is great but now i’m yet again stuck on something very basic i think 😛

[http://www.semagames.be/testplaats/portHome.swf](http://www.semagames.be/testplaats/portHome.swf)  
You notice that their are ‘particles’ falling from the position of the mouse but for some sort of stupid reason they get stuck at a certain point in time. Can anyone help me out on this one ?

Also, the three white bars are dragable, but i want them to swing back in to place when you release them. Is this also possible with a tween ? or do i need to code something physic-like. Cause my math is not That good 😛

Grts all !

The code:

```auto

package {
    import flash.events.*;
    import flash.display.*;
    import fl.transitions.*;
    import fl.transitions.easing.*;
    import flash.display.Sprite;
    import flash.events.Event;

    public class Velocity extends MovieClip {

        private var _sprite:Sprite;

        public function Velocity() {

            this.addEventListener(Event.ENTER_FRAME,handleAddedToStage);

        }

        private function handleAddedToStage(event:Event):void {

            this.runAssets();

        }
        private function runAssets():void {
            var _dikte:Number=rand(0.1,1);

            var _ystart:Number=mouseY;
            _sprite=new Sprite ;

            _sprite.graphics.beginFill(0xFF0000);
            _sprite.graphics.drawCircle(0,0,_dikte);
            _sprite.graphics.endFill();
            _sprite.x=mouseX;
            _sprite.y=mouseY;
            addChild(_sprite);

            var startValue:Number=_sprite.y;
            var duration:Number=10;
            var myTween:Tween=new Tween(_sprite,"y",Bounce.easeInOut,startValue,stage.stageHeight,duration,true);
            
            
            //myTween.looping=true;
        }
        private function rand(minimum:Number,maximum:Number):Number {
            return Math.floor(minimum+Math.random()*maximum-minimum+1);
        }
    }
}

```

And the code i place on timeline:

```auto

import Velocity;

var v:Velocity=new Velocity();

addChildAt (v, 0);

```
