-
1. Re: Logic behind the error??
Ned Murphy Apr 11, 2013 6:02 AM (in response to Ron Colmen)WHat of the code you show is supposed to be stopping the countdown?
YOur problem might have to do with using the Date class to acquire values, though I cannot be sure. If you are relying on it then it might be updating to the current time rather than picking up from some previous value.
-
2. Re: Logic behind the error??
Ron Colmen Apr 11, 2013 10:17 AM (in response to Ned Murphy)this should stop the countdown.
function newFunction() {
if (condition1==true) {
conditionA
}
}
triggerConditionA = setInterval(newFunction, 2000);
-
3. Re: Logic behind the error??
Ron Colmen Apr 11, 2013 10:23 AM (in response to Ned Murphy)Thanks Ned.
if the the issue is with the Date class to acquiring values, how should this be approached?
-
4. Re: Logic behind the error??
Ned Murphy Apr 11, 2013 11:06 AM (in response to Ron Colmen)I don't see where you define conditionA nor do I see where you change its value. The following does nothing that I can see...
if (condition1==true) {
conditionA ???? what is this doing?
}
-
5. Re: Logic behind the error??
Ron Colmen Apr 11, 2013 11:23 AM (in response to Ned Murphy)it goes like this:
var cCount:Number = 0;
function newFunction() {
if (condition==true) {
if (cCount < 2) {
cCount++;
} else {
timeRem.text="";
}
} else {
cCount = 0;
}
}
triggerConditionA = setInterval(newFunction, 2000);
-
6. Re: Logic behind the error??
Ned Murphy Apr 11, 2013 12:40 PM (in response to Ron Colmen)You lost me with that response. How does that relate to conditionA? How does that explain the line I added all the question marks to?
-
7. Re: Logic behind the error??
Ron Colmen Apr 11, 2013 1:32 PM (in response to Ned Murphy)conditionA is checking whether cCount < 2
The countdwon continues until cCount = 2. then the countdown stops and while cCount = 2, if button15 is clicked the countdown to be continued from where it left.
-
8. Re: Logic behind the error??
Ron Colmen Apr 12, 2013 12:04 AM (in response to Ron Colmen)Thanks for your time Ned. Got it sorted. Issue was having the Date class acquiring values in the incorrect place in the code....



