hey guys, I am having problems working out the difference between two numbers… here is the code that I am using:
var rawDifference:Number;
var minuteDifference:Number;
function calculateMinuteDifference()
{
rawDifference = currentMinute - recentMinute2;
if (rawDifference < 0)
{
minuteDifference = 60 + rawDifference;
}
else if (rawDifference > 0)
{
minuteDifference = rawDifference;
}
}
and the output i get is:
//The Raw Difference is: undefined
//The Difference in Minutes: undefined
does anybody have any idea why this might be happening?
thanks in advance