Return to Snippet

Revision: 22558
at January 15, 2010 11:11 by chrisaiv


Initial Code
var fifteenMinutes:Number = minutesToMilliSecs( 15 );

var timer = new Timer( fifteenMinutes );
	timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true );
	timer.start();

private function minutesToMilliSecs( mins:Number ):Number
{
	var milliSecs:Number = mins * 60 * 1000;
	return milliSecs;
}

private function timerHandler( e:TimerEvent ):void
{
	trace( "timerHandler:" )
}

Initial URL

                                

Initial Description
Quick little helper method that allows you to no longer think in Milliseconds

Initial Title
AS3: Minutes to Milliseconds Helper

Initial Tags

                                

Initial Language
ActionScript 3