Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

setInterval in compositionReady

$
0
0

hi everybody,

 

i hope someone can help me with my problem:

 

i want to use setInterval to repeat a function defined in compositionReady but it doesn't work:

 

var count = 0.;

var counter_pos = setInterval(countClicks, 200.);

 

sym.countClicks = function()

{

count = count + 1;

if (count > 10.)

count = 1.;

sym.$("dymtext").html(count);

}

 

button code: sym.getComposition().getStage().countClicks();

 

 

but:

the setInterval works fine by using the click command of the button:

 

var count = 0.;

var counter_pos = setInterval(countClicks, 200.);

 

function countClicks()

{

count = count + 1;

if (count > 10.)

count = 1.;

sym.$("dymtext2").html(count);

}

 

 

what's wrong with my setInterval in compositionReady?

 

thanks for your help!


Viewing all articles
Browse latest Browse all 9897

Trending Articles