Flint Particle System Forum - Stop Method for Steady counter 2010-12-25T18:54:53+00:00 http://flintparticles.org/forum/ Lussumo Vanilla & Feed Publisher Stop Method for Steady counter http://flintparticles.org/forum/comments.php?DiscussionID=40&Focus=214#Comment_214 2008-06-12T21:25:30+01:00 2008-06-13T13:05:02+01:00 swd120 http://flintparticles.org/forum/account.php?u=33 I'm having some issues using the stop method on a steady counter - how exactly to I reference it? Basically I want to be able to toggle the particles on and off. Stop Method for Steady counter http://flintparticles.org/forum/comments.php?DiscussionID=40&Focus=215#Comment_215 2008-06-13T13:04:51+01:00 2010-12-25T18:54:53+00:00 Richard http://flintparticles.org/forum/account.php?u=1 Either retain a reference to your counter - var steadyCounter:Steady = new Steady( 100 ); emitter.counter = steadyCounter; steadyCounter.stop(); or cast the counter reference from the ...
var steadyCounter:Steady = new Steady( 100 );
emitter.counter = steadyCounter;
steadyCounter.stop();


or cast the counter reference from the emitter

emitter.counter = new Steady( 100 );
Steady( emitter.counter ).stop();


A future version will require all counters to have a stop method, so stop can be rolled into the Counter interface and there will be no need for the type cast.]]>