Flint Particle System Forum - Steady stops emitting Thu, 23 Jun 2011 17:01:22 +0100 http://flintparticles.org/forum/ Lussumo Vanilla 1.1.10 & Feed Publisher Steady stops emitting http://flintparticles.org/forum/comments.php?DiscussionID=75&Focus=349#Comment_349 http://flintparticles.org/forum/comments.php?DiscussionID=75&Focus=349#Comment_349 Tue, 02 Sep 2008 11:58:17 +0100 Flashingback
I have made a waterfall and it looks good but the particles just freeze after a while and the emitter stops emitting. It probably to heavy or something. Hopefully there is solution for keeping it runing.

This is my code


var renderer = new BitmapRenderer ( new Rectangle( 0, 0, 400, 250 ) );
renderer.addFilter( new ColorMatrixFilter([ 1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0.96,0 ]));
addChild( renderer );


var emitter:Emitter = new Emitter();
emitter.counter = new Steady(10);
emitter.addInitializer( new ImageClass( waterDrop ) );
emitter.addInitializer( new Position( new LineZone(new Point(0,0),new Point(41,17) ) ) );
emitter.addInitializer( new Velocity( new LineZone(new Point(0,50),new Point(0,50) ) ) );
emitter.addInitializer( new Lifetime(1,5) );
emitter.addAction ( new Age() );

emitter.addAction ( new ColorChange(0xCBDBD1,0xF0F4F3) );
emitter.addAction ( new Move());
emitter.addAction ( new Fade(0.3,0) );
emitter.renderer = renderer;
emitter.start();



You can view the project here http://www.flashingback.be/beta/ ]]>
Steady stops emitting http://flintparticles.org/forum/comments.php?DiscussionID=75&Focus=350#Comment_350 http://flintparticles.org/forum/comments.php?DiscussionID=75&Focus=350#Comment_350 Tue, 02 Sep 2008 20:02:21 +0100 Richard
All I can suggest is that maybe something else on your machine is hogging memory and/or processor and slowing other software down, including the flash player.

Flint has a fail-safe that stops it rendering frames that have a long duration (e.g. when you resize the browser window, during which flash stops, the next frame will last as long as the resize took. Flint is designed to ignore this frame).

The emitter has a property called the maximumFrameTime that indicates the maximum length for frames to be used - if a frame is longer than this it is ignored. The default value for maximumFrameTime is 0.1 seconds. If other software is slowing flash down, it may be running slower than 10 frames per second and hence stopping. To check this, try setting maximumFrameTime to a larger value - e.g.

emitter.maximumFrameTime = 1

for a maximum frame time of one second.

P.S. The effect looks great.

P.P.S. You could optimize the effect a little by reducing the size of the BitmapRenderer to just what you need - something like

var renderer = new BitmapRenderer ( new Rectangle( 0, 0, 50, 250 ) ); ]]>
Steady stops emitting http://flintparticles.org/forum/comments.php?DiscussionID=75&Focus=351#Comment_351 http://flintparticles.org/forum/comments.php?DiscussionID=75&Focus=351#Comment_351 Tue, 02 Sep 2008 20:06:54 +0100 Richard Steady stops emitting http://flintparticles.org/forum/comments.php?DiscussionID=75&Focus=352#Comment_352 http://flintparticles.org/forum/comments.php?DiscussionID=75&Focus=352#Comment_352 Tue, 02 Sep 2008 20:19:40 +0100 Flashingback
[quote]P.S. The effect looks great.[/quote]

Thx, trying to get the best out of it.

[quote]P.P.S. You could optimize the effect a little by reducing the size of the BitmapRenderer to just what you need - something like[/quote]

I changed that allready :)

[quote]if you are creating the emitter inside a function, then you're not retaining a reference to the emitter and it could be garbage collected at any time, which would freeze the renderer[/quote

Yeps you are right, it was just some quick code tot test if it was posible to make aa realistic waterfall with flint otherwise I would have used an flv


PS: the maximumFrameTime variable doesn't exist on the emitter class or do I have an older version? ]]>
Steady stops emitting http://flintparticles.org/forum/comments.php?DiscussionID=75&Focus=353#Comment_353 http://flintparticles.org/forum/comments.php?DiscussionID=75&Focus=353#Comment_353 Tue, 02 Sep 2008 22:15:28 +0100 Richard PS: the maximumFrameTime variable doesn't exist on the emitter class or do I have an older version?

It was introduced in 1.0.4, so maybe you have an older version. ]]>