Flint Particle System Forum - Steady stops emitting 2011-06-23T13:39:59+01:00 http://flintparticles.org/forum/ Lussumo Vanilla & Feed Publisher Steady stops emitting http://flintparticles.org/forum/comments.php?DiscussionID=75&Focus=349#Comment_349 2008-09-02T11:58:17+01:00 2008-09-02T20:03:20+01:00 Flashingback http://flintparticles.org/forum/account.php?u=38 Hello,... here I am again. 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 ...
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 2008-09-02T20:02:21+01:00 2011-06-23T13:39:59+01:00 Richard http://flintparticles.org/forum/account.php?u=1 I've run your test site for half an hour, and the effect is still going. Also, I ran the code you posted above through the Flex profiler and there's no memory leaks or any other problems. It all ...
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 2008-09-02T20:06:54+01:00 2011-06-23T13:39:59+01:00 Richard http://flintparticles.org/forum/account.php?u=1 Another thought - 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 ... Steady stops emitting http://flintparticles.org/forum/comments.php?DiscussionID=75&Focus=352#Comment_352 2008-09-02T20:19:40+01:00 2008-09-02T20:27:29+01:00 Flashingback http://flintparticles.org/forum/account.php?u=38 You are probably right, my machine is pretty slow nower days and other people don't have the problem. [quote]P.S. The effect looks great.[/quote] Thx, trying to get the best out of ...
[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 2008-09-02T22:15:28+01:00 2011-06-23T13:39:59+01:00 Richard http://flintparticles.org/forum/account.php?u=1 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. 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.]]>