[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

    2 Mal editiert, zuletzt von zadda (10. August 2015 um 18:11)

  • 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)

  • Zitat

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

    my bad...

    Zitat

    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

    2 Mal editiert, zuletzt von zadda (1. August 2015 um 17:39)

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

    Piotr

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!