Flint Particle System Forum - particles follow mouse position Sat, 25 Dec 2010 19:08:46 +0000 http://flintparticles.org/forum/ Lussumo Vanilla 1.1.10 & Feed Publisher particles follow mouse position http://flintparticles.org/forum/comments.php?DiscussionID=107&Focus=450#Comment_450 http://flintparticles.org/forum/comments.php?DiscussionID=107&Focus=450#Comment_450 Mon, 27 Oct 2008 12:42:40 +0000 mp i need some help...i'm trying to put the particles, moving to the mouse position.
for now i've a setTimeout function that checks every second the mouse position, and if i click in the stage, i want that particles 'fall down'.

before declaring that the particles should follow the mouse position, i had random positions and at some way the particles were moving to the indicated positions.
but now the particles aren't moving to the mouse position...After the particles collide the first time against the bounding box, they stay at that position.

here is some part of my code:

//
stage.addEventListener(MouseEvent.CLICK, stopMouse);

var myTimer:Timer = new Timer(1000);
myTimer.addEventListener('timer', moveMouse);

function moveMouse (evt:TimerEvent):void
{
emitter.addAction( new Accelerate( mouseX,mouseY));
}

function stopMouse(evt:MouseEvent):void
{
myTimer.removeEventListener('timer', moveMouse);
emitter.addAction( new Accelerate( 0,10) );
}
myTimer.start();


thanks
mp ]]>
particles follow mouse position http://flintparticles.org/forum/comments.php?DiscussionID=107&Focus=455#Comment_455 http://flintparticles.org/forum/comments.php?DiscussionID=107&Focus=455#Comment_455 Thu, 30 Oct 2008 15:08:18 +0000 Richard