This question might already been discussed but I couldn't find quite what I was looking for.
I'm working on Adobe Edge Animate with HTML+JS. This is a full JS question so that's why I'm posting it here. I wrote a bit of code to have dialogue box appear at a specific time during the day. The dialogue has two buttons: "Play Video Now" and "Remind me in 10 mins"
Here is the code:
function updateClock() {
var d = new Date(); // current date
var m = d.getMinutes();
var h = d.getHours();
console.log(h, ":", m);
// call this function again in 1000ms
sym.updateClock = setTimeout(updateClock, 1000);
if (h == 9 && m == 0) { //at 9hrs 00 min
//run the dialogue for the morning pause
sym.play(1000);
} else {
sym.stop(1000);
}
}
updateClock(); // initial call
Then I have to bind the snooze button so it adds 10 minutes to my conditional statement. I know I have to add some sort of "count" variable, but I don't know exactly how to do it.
(function(symbolName) {
Symbol.bindElementAction(compId, symbolName, "${_snoze_btn}", "click", function(sym, e) {
}