How do i do a simple FLASH timer with a lil' bit of hitTest?

iHatePopUpsiHatePopUps Singapore
edited August 2005 in Internet & Media
Okay...i'm doing a project on a racing game, and the vehicle the user uses is supposed to have a fuel meter. I'm told that i'm supposed to make a movieclip "box" and put dynamic text in it. And anytime the vehicle collides with another object in an array that i've set up, the fuel value is supposed to decrease by a set number. Otherwise, it goes down at a rate of 1 a second. Maybe someone can help me edit/correct my code?


var m_TimerFunkInterval:Number = setInterval( TimerFunk, 1000, this );
inMC.m_CurrTime = 20; // seconds
var TimerFunk:Function = function ( inMC:MovieClip )
{
inMC.Meter.fuelval.text = "" + inMC.m_CurrTime;
inMC.m_CurrTime --;
inMC.m_CurrTime = inMC.m_NewCurrTime;
inMC.Meter.fuelval.text = "" + inMC.m_CurrTime;
}

{
inMC.TimeOutFunk();
clearInterval( inMc.m_TimerFunkInterval );
}


note: fuelval is the dynamic textbox for the meter, while Meter is the name of the movieclip
Sign In or Register to comment.