I'm pretty new to actionscript. I'm making a flash piece that has a particle system (flint particles) that's working pretty well... I want to write a function that uses a rollover and rollout even handlers to pause and resume the particle system.

To test the pause and resume action I have two buttons on the stage just to get my feet wet, and that's working great with this code...

Code:
pauseBtn.addEventListener( MouseEvent.MOUSE_DOWN, pauseParticles );
resumeBtn.addEventListener( MouseEvent.MOUSE_DOWN, resumeParticles );

function pauseParticles(e:MouseEvent){
	//trace("pause button clicked");
	emitter1.pause();

}

function resumeParticles(e:MouseEvent){
	//trace("resume button clicked");
	emitter1.resume();

}





Now what I want to happen is when the user rolls off of a mc (let's call it mouseDetect_mc), a timer begins and will call the "pauseParticles" function after 15 seconds... Then if the user rolls BACK over mouseDetect_mc the resumeParticles function will get called.

The tricky part (for me) is making sure that pause function isn't called if the user were to roll off for less than 15 seconds, and then roll back on (the particles should just continue as is).