Flint Particle System Forum - particles animation progressively slower2010-12-25T19:07:27+00:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
particles animation progressively slowerhttp://flintparticles.org/forum/comments.php?DiscussionID=109&Focus=453#Comment_4532008-10-30T11:50:30+00:002010-12-25T19:07:27+00:00mphttp://flintparticles.org/forum/account.php?u=83
hi
i 've a particles animation inside a movieclip. this movieclip 've two addEventListener: MOUSE_DOWN to drag and MOUSE_UP to drop.
every time i 'drag' the movieclip (particles container), i ...
i 've a particles animation inside a movieclip. this movieclip 've two addEventListener: MOUSE_DOWN to drag and MOUSE_UP to drop.
every time i 'drag' the movieclip (particles container), i add to stage an addEventListener(MOUSE_MOVE) to set the 'explosion' action, while the mouse is moving. emitter.addAction( new Explosion(.3, 130, 250, 500, 20, 1));
when i 'drop' it i remove the listener from the stage, and i give the emitter an 'accelerate' action, to make them fall down. emitter.addAction( new Accelerate( 0,10) );
after a few seconds without dragging it, i see that the particles overlap to each other, staying in a slim 'line', as if they were disappearing. when i start to drag, it seems that i really lost some particles, and the animation becomes progressively slower.
any hints how i could do this in a better way?
thanks!
some of my code:
//---EMITTER PARTICLES var emitter:Emitter2D = new Emitter2D(); emitter.counter = new Blast( 1000 );
var air:InitializerGroup = new InitializerGroup(); air.addInitializer( new ImageClass( Dot, 2 ) ); air.addInitializer( new ColorInit( 0xFFFFFFFF, 0xFFFFFFFF ) ); air.addInitializer( new MassInit( .5 ) ); air.addInitializer( new CollisionRadiusInit( 2.5) );
emitter.addInitializer( new Position( new RectangleZone( 0, 220, 251, 230 ) ) ); emitter.addInitializer( new Velocity( new DiscZone( new Point( 0, 0 ), 1, 1 ) ) ); emitter.addInitializer( new ChooseInitializer( [ air ], [ 10 ] ) );
emitter.addAction( new Move() ); emitter.addAction( new Collide( 1 ) ); emitter.addAction( new Friction( .5 ) ); emitter.addAction( new BoundingBox( 2, 0, 256, 243, .5 ) ); emitter.addInitializer( new ScaleImageInit( 0.5, 1.3) ); emitter.addAction( new ShowAirAction( stage ) );]]>
particles animation progressively slowerhttp://flintparticles.org/forum/comments.php?DiscussionID=109&Focus=457#Comment_4572008-10-30T15:16:18+00:002008-10-30T15:16:56+00:00Richardhttp://flintparticles.org/forum/account.php?u=1
If you add an explosion every time you move the mouse, you'll end up with lots of explosion actions all running. That would account for the slow down. You need to remove the explosions when you're ...
var explosion:Explosion = new Explosion(.3, 130, 250, 500, 20, 1); emitter.addAction( explosion );
and later
emitter.removeAction( explosion );]]>
particles animation progressively slowerhttp://flintparticles.org/forum/comments.php?DiscussionID=109&Focus=464#Comment_4642008-10-31T13:05:05+00:002010-12-25T19:07:27+00:00mphttp://flintparticles.org/forum/account.php?u=83
thanks for all the replies to my posts.
;)
;)]]>