Problem: tween in for loop doesn't work

  • Hi all,

    first of all sorry if similar topic exists, I didn't found answer to my problem here.

    Situation:
    I've few plugins with alias. I'm doing FOR loop and try to tween them to be visible.
    But this doesn't work. Plugins are visible but not tween to alpha = 1.
    I want to get effect of fading in from not visible to visible, for all plugins with this alias.

    Code for plugins:

    Code
    <style name="circle_buttons" url="%SWFPATH%/circle_buttons.png" keep="true" align="bottom" y="15" crop="1|0|10|12" alpha="0" visible="false" zorder="-10" />
    
    
    <plugin name="scene1_circle" style="circle_buttons" onclick="loadscene(scene1, null, MERGE, BLEND(1));" alias="circle_buttons"/>
    <plugin name="scene2_circle" style="circle_buttons"  onclick="loadscene(scene2, null, MERGE, BLEND(1));" alias="circle_buttons"/>

    Code for loop:

    Code
    for(set(i,0), i LT plugin.count, inc(i),
    	if(plugin[get(i)].alias == circle_buttons,
    		set(plugin[get(i)].visible, true);
    		tween(plugin[get(i)].alpha, 1);			
    	);
    );

    Loop is working, I can set alpha to 1 but I'd like to have nice fade effect.
    All help appreciate.

Jetzt mitmachen!

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