hi
i do my own way for example if administrator want to animation start at 20:30 with on= [true,false,true,true,false....] arrayi check if time is 20:30 if yes i start it for first item(on[0])and then i check time again if time is 20:30+X(difference two action time) if time is ok then i process it for seconde item(on[1]) this algoritm good looks but when i call switch on or off function it does not work
calling this function does not work
flashlightPlugin(on[ index ]);
function flashlightDemo(on) {
var tarih=window.localStorage.getItem("tarih");
var ileri_geri=window.localStorage.getItem("ileri_geri");
while(2>1){
for (;;) {
if(parseInt(new Date().getTime()/1000)>(parseInt(new Date(tarih).getTime()/1000)+parseInt(ileri_geri)+parseInt(index*20)))
{
flashlightPlugin(on[ index ]);
index++;
break;
.....................
and this is flashlightPlugin(on[ index ]);
function flashlightPlugin(on) {
if ( on==='true') {
window.plugins.flashlight.switchOn();
}
else
{
window.plugins.flashlight.switchOff();
}
}