Flint Particle System Forum - Adding and removing actions 2010-11-17T09:55:00+00:00 http://flintparticles.org/forum/ Lussumo Vanilla & Feed Publisher Adding and removing actions http://flintparticles.org/forum/comments.php?DiscussionID=46&Focus=232#Comment_232 2008-07-11T12:41:46+01:00 2008-07-11T12:56:45+01:00 madaerodog http://flintparticles.org/forum/account.php?u=42 So , big thumbs up for your work, like it alot. How do you remove an action .. I put a button on the stage and I add an action like this emitter.addAction( new MouseGravity(100)); All ...
How do you remove an action ..

I put a button on the stage and I add an action like this

emitter.addAction( new MouseGravity(100));

All nice and working , and if i put the following action on another button

emitter.removeAction( new MouseGravity(100));

... nothing happens

tried

emitter.addAction( new MouseGravity(0));

still no result the gravity is there ..

So how do you correctly remove an action?]]>
Adding and removing actions http://flintparticles.org/forum/comments.php?DiscussionID=46&Focus=234#Comment_234 2008-07-11T12:55:53+01:00 2008-07-11T12:56:00+01:00 Richard http://flintparticles.org/forum/account.php?u=1 You need to retain a reference to the action that you want to remove. So var mg:MouseGravity = new MouseGravity( 100 ); emitter.addAction( mg ); and later emitter.removeAction( mg );
var mg:MouseGravity = new MouseGravity( 100 );
emitter.addAction( mg );

and later

emitter.removeAction( mg );]]>
Adding and removing actions http://flintparticles.org/forum/comments.php?DiscussionID=46&Focus=235#Comment_235 2008-07-11T13:24:15+01:00 2010-11-17T09:55:00+00:00 madaerodog http://flintparticles.org/forum/account.php?u=42 tx for the fast answer . It works :)