You are not logged in.

1

Monday, January 24th 2011, 6:00pm

animation.swf load if i press bouton

Hello,

I want to see animation.swf in my pano but when load pano my animation is finish.
i would like bouton to load and unload my animation.swf
is it possible ?

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<plugin name="boutonload" url="images/commun/load.png" align="righttop"  x="35" y="30"  keep="true" 
	    	onhover="tween(scale,1.1)"  onout="tween(scale,1)"	onclick="action(load)"  />		
	
<plugin name="boutonclose" url="images/commun/close.png" align="righttop"  x="40" y="30"  keep="true" 
	    	onhover="tween(scale,1.1)"  onout="tween(scale,1)" 	onclick="action(close)"  />

<action name="actionload">  
	 plugin[animation].loader   
	</action>

<action name="actionclose">  
	plugin[animation].unloader
	</action>

<plugin name="animation" url="animation.swf" align="center"


thank you

Tuur

Sage

Posts: 3,839

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

2

Monday, January 24th 2011, 6:16pm

Hi,

doesn't it work when you just set it visible true in the onclick?


Tuur *thumbsup*

VN2009

Professional

Posts: 1,336

Location: Duluth MN

  • Send private message

3

Monday, January 24th 2011, 11:32pm

the way your plugin is coded it runs soon as it is loaded in the background. you would have to add some AS3 code to make it wait for something to trigger it. your other option it to make an action that builds the plugin onqueue. then there will be no way for it to be complete as it never exsisted proior to you creating it.

<action name="startanimation">
createplugin(animation);
set(plugin[animation].url, animation.swf);
set(plugin[animation].align, center);
</action>

4

Tuesday, January 25th 2011, 2:19pm

thank you for reply
is it possible to create an action variable ?

in xml

<plugin name="boutonload" url="images/commun/load.png" align="righttop" x="35" y="30" keep="true"
onhover="tween(scale,1.1)" onout="tween(scale,1)" />


in AS3
var press= krpano.get("plugin[boutonload].onclick");
if (press == true)
press = false;
goto frame 1
else
press = false;

i'm begin in AS3 the code is good *question*

VN2009

Professional

Posts: 1,336

Location: Duluth MN

  • Send private message

5

Tuesday, January 25th 2011, 3:04pm

i know nothing about AS3. i hope it works !

Similar threads