;

PDA

Click to See Complete Forum and Search --> : Help with Delaying a function!! Please


cpmartin
01-18-2008, 03:18 PM
Thank you in advance for looking at my question.

This is my code:


function loadCurrentPage(newPageNode) {
btn_next._alpha = 50;
btn_next.enabled = false;
millisecondsToDelay = 25*1000; // 21 second
myFutureFunction = function()
{
clearInterval(ih);
btn_next._alpha = 100;
btn_next.enabled = true;
// do future stuff here...
}
ih = setInterval(myFutureFunction, millisecondsToDelay);
//Enables Next button after 20 seconds (Table of Contents).
s

I am trying to delay when my next button will become enabled. The millisecondToDelay works but after a while it starts to gain and lose time. It is unreliable. Is there a frameToDelay that I could use?

Whyves
01-18-2008, 09:29 PM
You posted the same exact question in the Actionscript board and you were answered. You should post your question in only one board.

cpmartin
01-21-2008, 12:47 PM
Well from your reply to my post I am assuming you are perfect and have never made a mistake. Good job, you should be rewarded.

Whyves
01-21-2008, 01:24 PM
Wow ... you jump to your guns quickly! I just wanted to let you know that by posting the same question in 2 different boards, you may have other people trying to help you out for nothing since it may have been answered in the other board.

And it was exactly that case. By the way I tried to help you out in the other board too and suggested a solution ...