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

loop code x times with counting parameter / variable

$
0
0

Hi there,

due to my lack of knowledge about coding JavaScript, I'm stuck here and I can't find the right way by google and try and error..

 

I want to loop a code / function .. let's say 100 times and each time one parameter or variable is counted up.

I found "for"-loops and some with a counter.. but I coudn't get it to work in Edge Animate..

 

Here is a fragment of the code I want to loop ->

 

 

$.get("http://......./publish/web/output1.php?id="+Num, {}, function(ask, code) {        

  

switch(ask) {

.....

        case '9':

    sym.$("leaf"+Num).show();

    var leaf = sym.$("leaf"+Num);   // How can I count the setting variable? "var leaf+Num = ... " doesn't work I guess..

    TweenMax.to(leaf+Num, 1, {scale:1.5});

    TweenMax.to(leaf+Num, 2, {rotation:rand, ease:"Power1.easeInOut", yoyo:true, repeat:-1});

    sym.randfunc();

  break;

    }

});

 

 

Thanks for help!


Viewing all articles
Browse latest Browse all 9897

Trending Articles