You are not logged in.

1

Monday, July 30th 2012, 2:47pm

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:

Source code

1
2
3
4
<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:

Source code

1
2
3
4
5
6
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.

Posts: 1,857

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

2

Monday, July 30th 2012, 5:10pm

KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

3

Monday, July 30th 2012, 6:32pm

Thank you for help! *smile*