[Solved] How to add several plugins with addplugin and loop

  • hi,
    i want to use a more dynamic way to add shadow to my thumbs
    but i got action overflow warning with this code :

    i know when there action overflow,
    we can fix using :
    wait(0); or wait(0.001);
    delayedcall
    asyncloop

    but i had tried many different combination with that and always meet the action overflow in error console..
    even if i have only 7 thumbs in my group="thumbs"... *blink*

    help appreciated *smile*

    thanks

    z

    Edited 2 times, last by zadda (August 10, 2015 at 6:11 PM).

  • well,
    just removed dec(i);
    and replaced with a trace(coco);
    and no more action overflow,
    in the console i got 7 "coco" , the right number of thumbs *smile* but there the shadow added only on the last thumb (may be severals over the same place)

  • Quote

    by doing inc(i) + dec(i) you create basically an endless loop

    my bad...

    Quote

    try removing the preload="true" and the alturl

    ok done

    i've added some trace too :


    and the error console show what's expected : 7 different names,
    but there still only One single shadow added on the last thumb only *huh*

    is the code above add only one plugin ??
    how to make it loop to add as much plugin as there are thumbs ? *confused*

    yes i traced number of plugin before and after the action with :

    Code
    trace('there ','get(plugin.count)',' plugins before');


    and confirmation only 1 plugin is created instead of 7..

    there a little glitch, i am stuck there...

    thanks

    z

    Edited 2 times, last by zadda (August 1, 2015 at 5:39 PM).

  • *thumbup*
    If you want to make it more elegantly, you can use styles.

    Piotr

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!