Flint Particle System Forum - Adding and removing actions2010-11-17T09:55:00+00:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
Adding and removing actionshttp://flintparticles.org/forum/comments.php?DiscussionID=46&Focus=232#Comment_2322008-07-11T12:41:46+01:002008-07-11T12:56:45+01:00madaerodoghttp://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 actionshttp://flintparticles.org/forum/comments.php?DiscussionID=46&Focus=234#Comment_2342008-07-11T12:55:53+01:002008-07-11T12:56:00+01:00Richardhttp://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 actionshttp://flintparticles.org/forum/comments.php?DiscussionID=46&Focus=235#Comment_2352008-07-11T13:24:15+01:002010-11-17T09:55:00+00:00madaerodoghttp://flintparticles.org/forum/account.php?u=42
tx for the fast answer . It works :)