You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

joekki

Trainee

  • "joekki" started this thread

Posts: 78

Location: Turku, Finland

Occupation: Panoramic photographer and web site builder

  • Send private message

1

Sunday, June 28th 2009, 10:27am

Using switch when changing button URL - problem

Hi all, and of course our master, Klaus. :)

I have a problem with one of my buttons. The code below doesn't change the button like it should..?

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<plugin name="rotate"
 url="buttons/btn_stop.png"
 align="bottom"
 edge="center"
 y="30" x="90"
 onhover="showtext(Pysäytä automaattinen pyöriminen / Jatka pyörimistä)"
 blendmode="screen"
 onclick="switch(plugin[rotate].url,buttons/btn_stop.png,buttons/btn_rotate.png);switch(autorotate.enabled);"
 onover="set(plugin[rotate].blendmode,add);" 
 onout="set(plugin[rotate].blendmode,screen);"
 keep="true"
 alpha="0.7"
 width="40"
 height="prop" />


To be precise:

Source code

1
onclick="switch(plugin[rotate].url,buttons/btn_stop.png,buttons/btn_rotate.png);"


It stops the autorotate as it should but the button url changing doesn't work. Have I done something wrong? :)

Here's the pano url: http://panoraamakuvat.fi/kuvat/turku/koy…rtuaaliesittely

And the XML:
http://panoraamakuvat.fi/asiakkaat/Jyrkk…ly_20090625.xml

Note: The plugin rotate is in this file:
http://panoraamakuvat.fi/asiakkaat/panoraamakuvatfi.xml

I'm using the latest beta, build 15.6.2009, 1.0.8b8

EDIT 29.06.2009:
the URLs above has got currenlty an alternative solution. The problem URLs are here:

http://panoraamakuvat.fi/kuvat/krpano/button-switch-problem

http://www.panoraamakuvat.fi/asiakkaat/J…ton_problem.xml

http://www.panoraamakuvat.fi/asiakkaat/p…ton_problem.xml

This post has been edited 1 times, last edit by "joekki" (Jun 29th 2009, 10:34pm)


michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

2

Sunday, June 28th 2009, 11:17am

Hi Joekki,

It seems that there is a new line on your xml code that make the switch(plugin[rotate].url,buttons/btn_stop.png,buttons/btn_rotate.png); to not work....like this:

Source code

1
2
switch(plugin
[rotate].url,buttons/btn_stop.png,buttons/btn_rotate.png);

changing this, makes your code works as expected.

Hope this can help. ;-)

Salut.

Edited: the new line was because I copy/paste the plugin and this copy has a new line after plugin (like show above) and this cause the switch(plugin[rotate] .... not working !!!

This post has been edited 2 times, last edit by "michel" (Jun 28th 2009, 9:03pm)


joekki

Trainee

  • "joekki" started this thread

Posts: 78

Location: Turku, Finland

Occupation: Panoramic photographer and web site builder

  • Send private message

3

Sunday, June 28th 2009, 12:05pm

Hi Joekki,

It seems that there is a new line on your xml code that make the
Hi Michel! Thanks for the advise but I cannot see any new lines there. I have checked with two different editors with EOL markers on, and with the editor-plugin as you see in the following screenshot:

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

4

Sunday, June 28th 2009, 3:21pm

Hi joekki,

You are right...
Your plugin[rotate] must work well as is !!!
I think, it must be a malformed xml format...
If you open your xml file directly on the url , you can see an error alert ... *confused*
http://panoraamakuvat.fi/asiakkaat/panoraamakuvatfi.xml

I do not understand what it is exactly (I'm not a Pro)... if somebody knows please explain us why *rolleyes*

Try to put a <krpano> tag at the beginning of your xml and a </krpano> tag a the end.
Doing so, the error alert disappear *attention*

Hope this can help.

Salut.

joekki

Trainee

  • "joekki" started this thread

Posts: 78

Location: Turku, Finland

Occupation: Panoramic photographer and web site builder

  • Send private message

5

Sunday, June 28th 2009, 6:50pm

Try to put a <krpano> tag at the beginning of your xml and a </krpano> tag a the end.
Doing so, the error alert disappear *attention*

Hi there, now the XML http://panoraamakuvat.fi/asiakkaat/panoraamakuvatfi.xml validates correctly, I forgot the <krpano> from the beginning like you said. :P But it didn't solve the problem. :-/ the buttons won't still change like I'd like..

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

6

Sunday, June 28th 2009, 7:38pm

hi joekki,

I am really sorry to not be of help... *cry*

I try and try again to understand but i can't see what it would be.

Your plugin[rotate] works as expected ... I think it is not the cause...
I have tried the following:

I use the krpano-1.0.8-beta8\examples\littleplanet example as a base...
I put on the xml file littleplanet.xml your plugin[rotate] with no change...
I have added a folder buttons into the littleplanet folder with a copy of your to buttons btn_stop.png and btn_rotate.png

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<krpano version="1.0.8" onstart="showtext(get(data[infotext].content), infostyle);">

<!-- use the editor for moving,rotating,scaling hotspots -->
<plugin name="editor"  url="%SWFPATH%/plugins/editor.swf"  />
<plugin name="options" url="%SWFPATH%/plugins/options.swf" />


<plugin name="rotate" url="buttons/btn_stop.png" align="bottom" edge="center" y="30" x="90" onhover="showtext(Pysäytä automaattinen pyöriminen / Jatka pyörimistä,infostyle)" blendmode="screen" onclick="switch(plugin[rotate].url,buttons/btn_stop.png,buttons/btn_rotate.png);switch(autorotate.enabled);" onover="set(plugin[rotate].blendmode,add);" onout="set(plugin[rotate].blendmode,screen);" keep="true" alpha="0.7" width="40" height="prop" />


<!-- text styles for startup text and onhover text -->
<textstyle name="infostyle"
       origin="top" edge="top" yoffset="20" textalign="center"  background="false" border="false"
       fontsize="40" textcolor="0xFFFFFF" bold="false" effect="glow(0xFFFFFF,0.7,4,2);glow(0x000000,1,4,2);dropshadow(3,45,0x000000,2,0.6);"
       showtime="10.0" fadetime="1.0"
       />
       
<data name="infotext">
[b][i]krpano[br]little planet example[/i][/b][br]
[font size="20"]use the right click context menu to change the projection[/font]
</data>       

<plugin name="options" url="%SWFPATH%/plugins/options.swf" />


<image>
<cubestrip url="pano.jpg" />
</image>


<!-- settings for little planets: -->
<view stereographic="true"
  fisheye="1.0"
  fov="150"
  fovmax="150"
  hlookat="-210"
  vlookat="72"
  />

<!-- fisheye and little planets views needs much rendering performance
to get more performance switch to flash9 rendering while in fisheye
of littleplanet/stereographic mode
-->

<display flash10="off" details="14" />


<!-- right-click context menu to change the viewing settings -->
<contextmenu>
<item caption="KRPANO" />
<item caption="FULLSCREEN" />
<item caption="normal view"    onclick="action(rectview);"      separator="true" />
<item caption="fisheye view"   onclick="action(fisheyeview);"   />
<item caption="architectural view" onclick="action(architectural);" />
<item caption="stereographic view" onclick="action(stereofisheyeview);" />
<item caption="little planet view" onclick="action(littleplanet);"  />
</contextmenu>


<!-- actions for view changing -->
<action name="rectview">
tween(view.fovmax,   150.0, distance(150, 0.25), easeoutquad);
tween(view.architectural,  0.0, distance(1.0, 0.25), easeoutquad);
tween(view.fisheye,    0.0, distance(1.0, 0.25), easeoutquad, set(view.stereographic,false);set(display.flash10,on); );
</action>

<action name="fisheyeview">
set(display.flash10,off);
tween(view.architectural, 0.0, distance(1.0, 0.25), easeoutquad);
tween(view.fisheye,   0.0 ,distance(1.0, 0.20), easeoutquad,
set(view.stereographic,false);
set(view.fovmax,179);
tween(view.fisheye, 0.35, distance(1.0, 1.25));
 );
</action>

<action name="stereofisheyeview">
set(display.flash10,off);
tween(view.architectural, 0.0, distance(1.0, 0.25), easeoutquad);
tween(view.fisheye,   0.0 ,distance(1.0, 0.10), easeoutquad,
set(view.stereographic,true);
tween(view.fisheye, 1.0, distance(1.0, 1.25));
tween(view.fovmax,  150, distance(179, 1.25));
 );
</action>

<action name="littleplanet">
set(display.flash10,off);
tween(view.architectural, 0.0, distance(1.0, 0.25), easeoutquad);
tween(view.fisheye,   0.0 ,distance(1.0, 0.10), easeoutquad,
set(view.stereographic,true);
tween(view.fisheye, 1.0, distance(1.0, 0.75));
tween(view.fov, 130, distance(179, 0.75), easeoutquad, set(view.fovmax,150););
tween(view.vlookat,  90, distance(179, 0.75), easeoutquad);
 );
</action>

<action name="architectural">
tween(view.fovmax,   155.0, distance(179, 0.25), easeoutquad);
tween(view.architectural,  1.0, distance(1.0, 0.25), easeoutquad);
tween(view.fisheye,    0.0, distance(1.0, 0.25), easeoutquad, set(view.stereographic,false);set(display.flash10,on); );
</action>



</krpano>


AND IT WORK... *whistling*

Then I do not understand what it can be..SORRY... *wacko*

I noticed that the panoraamakuvatfi.xml it is included many times... perhaps this can be the cause... *whistling*

Edited: I noticed this to -- INFO: krpano 1.0.8 beta 8 (build 2009-06-04) - Try with the last version (build 2009-06-15)

If I see something more , I will tell you.

Salut.

This post has been edited 4 times, last edit by "michel" (Jun 28th 2009, 7:51pm)


michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

7

Sunday, June 28th 2009, 8:23pm

Hi joekki,

I have recuperated all your page via Internet Explore cache and reorganised it locally....

I put this on the URL http://127.0.0.1/web/krpano-1.0.8-beta8/…ly_20090625.xml

AND ALL IT IS WORKING *attention* *attention* *attention* *question* *question* *question*

I really want to now the cause why it does not work on-line *attention*

Hope this can help. *cursing* *squint*

Salut

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

8

Sunday, June 28th 2009, 11:38pm

Hi Joekki,

Try this URL:http://panoraamakuvat.fi/asiakkaat/krpan…y_20090625.xml&
It is a direct access to your page and this way it WORKS *attention*
Then there is no problem on the files you use with Krpano. They all works like you expect. *attention*

It must be an other thing But I do not know what it is. *cursing* *wacko*

His there anybody out there?
Graydon where are you... you always have the good words to explain things. *g*

Hope this can help.

Salut.

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

9

Monday, June 29th 2009, 1:04am

Hi joekki,

You know what ??? With the direct link acces above all is working ELSE the switch(fullscreen) action *attention* *attention* *attention*
I have tried the plugin[fullscreen] itself and ... it works normally *attention* so what it is happening here *question*
The only thing I see is there is no ; after the onclick="switch(fullscreen);" but locally it is working without this, so.

Really confused *wacko* I am going to sleep ;-) perhaps tomorrow *smile*

Salut.

joekki

Trainee

  • "joekki" started this thread

Posts: 78

Location: Turku, Finland

Occupation: Panoramic photographer and web site builder

  • Send private message

10

Monday, June 29th 2009, 8:08am

*thumbsup* WOW, you have really put effort on solving this issue!! huh.. Thank you for that!! *rolleyes*

A very strange thing was that http://panoraamakuvat.fi/asiakkaat/krpan…ly_20090625.xml works, but the fullscreen doesn't work now. I have no clue either of the reason what could cause this. I fixed the ';' after the fullscreen switch but no help.

I even removed the extra includes in every scene and there were no help with that action.. (I put the includes back, I have to fix something first before doing that - I don't remember what was it but I'll check. :D )

11

Monday, June 29th 2009, 1:24pm

Hi,

the fullscreen mode must be enabled explicitly via a parameter ("allowFullscreen") in the HTML file,
this is a security restriction from Flash,

when using the a direct link to a swf this parameter can't be set,
this is the reason why the fullscreen mode is not working in this case,

best regards,
Klaus

joekki

Trainee

  • "joekki" started this thread

Posts: 78

Location: Turku, Finland

Occupation: Panoramic photographer and web site builder

  • Send private message

12

Monday, June 29th 2009, 2:15pm

when using the a direct link to a swf this parameter can't be set,
this is the reason why the fullscreen mode is not working in this case,

best regards,
Klaus
Hi Klaus and thanks for solving the security issues of flash, again. :D,

but this leads us to the first question, why the rotate button won't change to another when clicking it in URL http://panoraamakuvat.fi/kuvat/turku/koy…rtuaaliesittely

Source code

1
<plugin name="rotate" url="buttons/btn_stop.png" align="bottom" edge="center" y="30" x="90" onhover="showtext(Pysäytä automaattinen pyöriminen / Jatka pyörimistä,infostyle)" blendmode="screen" onclick="switch(plugin[rotate].url,buttons/btn_stop.png,buttons/btn_rotate.png);switch(autorotate.enabled);" onover="set(plugin[rotate].blendmode,add);" onout="set(plugin[rotate].blendmode,screen);" keep="true" alpha="0.7" width="40" height="prop"/>


It works via direct swf URL[url]http://panoraamakuvat.fi/asiakkaat/krpano.swf?pano=Jyrkkalanpolku_virtuaaliesittely_20090625.xml[/url] but not via original url with html?

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

13

Monday, June 29th 2009, 5:27pm

Hi Joekki,

I am thinking on some kind of path issue...
So perhaps you can try to put the entire path to the btn_rotate.png like this:

Source code

1
 onclick="switch(plugin[rotate].url,buttons/btn_stop.png,http://panoraamakuvat.fi/asiakkaat/buttons/btn_rotate.png);switch(autorotate.enabled);"

Try it to see what's append. *whistling*

Hope this can help. ;-)

Salut.

joekki

Trainee

  • "joekki" started this thread

Posts: 78

Location: Turku, Finland

Occupation: Panoramic photographer and web site builder

  • Send private message

14

Monday, June 29th 2009, 6:48pm

Hi Joekki,

I am thinking on some kind of path issue...
So perhaps you can try to put the entire path to the btn_rotate.png like this:

Source code

1
 onclick="switch(plugin[rotate].url,buttons/btn_stop.png,http://panoraamakuvat.fi/asiakkaat/buttons/btn_rotate.png);switch(autorotate.enabled);"

Try it to see what's append. *whistling*

Hope this can help. ;-)

Salut.
Hi Michel!

Sorry, no help. *wacko*

<plugin name="rotate" url="buttons/btn_stop.png" align="bottom" edge="center" y="30" x="90" onhover="showtext(Pysäytä automaattinen pyöriminen / Jatka pyörimistä,infostyle)" blendmode="screen" onclick="switch(plugin[rotate].url,buttons/btn_stop.png,http://panoraamakuvat.fi/asiakkaat/buttons/btn_rotate.png);switch(autorotate.enabled);" onover="set(plugin[rotate].blendmode,add);" onout="set(plugin[rotate].blendmode,screen);" keep="true" alpha="0.7" width="40" height="prop"/>

... I'm out of ideas. i'm thinking that it has something to do with the html because it worked dicrectly with the swf & xml combination.

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

15

Monday, June 29th 2009, 8:26pm

Hi Joekki,

I have tried locally with a modified html based on your one:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<html>
<head>
<title>KOy Jyrkkälänpolku virtuaaliesittely - Panoraamakuvat.fi</title>


<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 
<meta name="description" content="KOy Jyrkkälänpolun virtuaaliesittely! Lisää panoraamaesittelyjä osoitteessa panoraamakuvat.fi" /> 
<meta name="keywords" content="jyrkkälä, jyrkkälänpolku, koy, panoraamakuvat, panoraamat, panoraama, panoraamakuvaus, panoraamoja, 360, kuvat, 360x180, 180, virtuaaliesittely, turku, raisio" /> 


<script type="text/javascript">
function add_to_facebook()
{
  window.open('http://www.facebook.com/sharer.php?u='+location.href+'&amp;t='+document.title, '_blank');
}
</script>

<style>

body{ font-family:Arial, Helvetica, sans-serif; font-size:10px; color:#FFFFFF; background-color:#000000; margin:0; padding:0; }
* html, * html body{ overflow: hidden; }
a{ color:#AAAAAA; text-decoration:underline; }
a:hover{ color:#FFFFFF; text-decoration:underline; }


</style>
</head>
<body>

<div id="krpano">
<noscript><table width="100%" height="100%"><tr valign="middle"><td><center><img src="/uploads/images/360_Jyrkkalanpolku_virtuaaliesittely_20090625.jpg" /><br>Tarvitset Javascriptin katsoaksesi panoraamaesityksiä. <br><br>Lisää panoraamakuvia osoitteesta: <a href="http://www.panoraamakuvat.fi">www.panoraamakuvat.fi</a></center></td></tr></table></noscript>
</div>

<script type="text/javascript" src="swfobject/swfobject.js"></script>
<script type="text/javascript" src="swfobject/swfkrpanomousewheel.js"></script>
<script type="text/javascript">
// <![CDATA[
if (typeof(deconcept) !== 'undefined' && deconcept.SWFObjectUtil.getPlayerVersion().major >= 6)
{
var so = new SWFObject("krpano.swf", "krpanoSWFObject", "100%", "100%", "9.0.28","#000000");
so.addParam("allowFullScreen","true");
so.addVariable("pano", "Jyrkkalanpolku_virtuaaliesittely_20090625.xml");
so.useExpressInstall("./swfobject/expressinstall.swf");
so.setAttribute("xiRedirectUrl", window.location);
if ( so.write("krpano") ) { var mousewheelfixes = new SWFkrpanoMouseWheel(so); }
}
else
{
document.getElementById("krpano").innerHTML = '<table width="100%" height="100%"><tr valign="middle"><td><center>ERROR:<br><br>Adobe Flash Player 9 needed<br><br><br><a href="http://www.adobe.com/go/getflashplayer/"  target="_blank"><IMG SRC="http://www.macromedia.com/images/shared/download_buttons/get_flash_player.gif" BORDER="1"></a><br>...click here to download...<br><br><br><br></center></td></tr></table>';
}
// ]]>
</script>


</body>
</html>


And.......... IT WORKS *attention* *confused*

Then, like you said before it seems to be something in the HTML....

So, I'm speculating that the problem perhaps have some relation to a path issue... *huh*
Perhaps it comes because of the <base href="http://panoraamakuvat.fi/" /> ...
Perhaps it is your URL http://panoraamakuvat.fi/kuvat/turku/koy-jyrkkalanpolku-virtuaaliesittely
and the path to yours xml files that are 3 step below the URL,
http://panoraamakuvat.fi/asiakkaat/Jyrkkalanpolku_virtuaaliesittely_20090625.xml
and http://panoraamakuvat.fi/asiakkaat/panoraamakuvatfi.xml

I really don't know, I'm not en expert, but something make me fill that the problem it is around this... *huh*

Try with full path to your files, like this:

Source code

1
2
3
4
5
6
7
8
9
	if (typeof(deconcept) !== 'undefined' && deconcept.SWFObjectUtil.getPlayerVersion().major >= 6)
	{
		var so = new SWFObject("http://panoraamakuvat.fi/asiakkaat/krpano.swf", "krpanoSWFObject", "100%", "100%", "9.0.28","#000000");
		so.addParam("allowFullScreen","true");
		so.addVariable("pano", "http://panoraamakuvat.fi/asiakkaat/Jyrkkalanpolku_virtuaaliesittely_20090625.xml");
		so.useExpressInstall("http://panoraamakuvat.fi/asiakkaat/swfobject/expressinstall.swf");
		so.setAttribute("xiRedirectUrl", window.location);
		if ( so.write("krpano") ) { var mousewheelfixes = new SWFkrpanoMouseWheel(so); }
	}

if it those not work, try to erase the <base href="http://panoraamakuvat.fi/" /> to see what's append...

Step by step we are going to catch it... ;-)

Salut.

joekki

Trainee

  • "joekki" started this thread

Posts: 78

Location: Turku, Finland

Occupation: Panoramic photographer and web site builder

  • Send private message

16

Monday, June 29th 2009, 10:11pm


Try with full path to your files, like this:

Source code

1
2
3
4
5
6
7
8
9
	if (typeof(deconcept) !== 'undefined' && deconcept.SWFObjectUtil.getPlayerVersion().major >= 6)
	{
		var so = new SWFObject("http://panoraamakuvat.fi/asiakkaat/krpano.swf", "krpanoSWFObject", "100%", "100%", "9.0.28","#000000");
		so.addParam("allowFullScreen","true");
		so.addVariable("pano", "http://panoraamakuvat.fi/asiakkaat/Jyrkkalanpolku_virtuaaliesittely_20090625.xml");
		so.useExpressInstall("http://panoraamakuvat.fi/asiakkaat/swfobject/expressinstall.swf");
		so.setAttribute("xiRedirectUrl", window.location);
		if ( so.write("krpano") ) { var mousewheelfixes = new SWFkrpanoMouseWheel(so); }
	}

if it those not work, try to erase the <base href="http://panoraamakuvat.fi/" /> to see what's append...

Step by step we are going to catch it... ;-)

Salut.
Hi Michel again :)

I have tried everything, with full paths (domain + folder + file), with and without the base href without any luck. I found another solution for this from Any way to swap one button for another on an event other than fullscreen?

So this at least works if everything else fails:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<plugin name="rotate_off"  
	url="%SWFPATH%/buttons/btn_stop.png" visible="true"
	align="bottom" edge="center" y="30" x="+90" 
	onhover="showtext(Pysäytä automaattinen pyöriminen,infostyle)" blendmode="screen"  		
	onover="set(plugin[rotate].blendmode,add);" 
	onout="set(plugin[rotate].blendmode,screen);" 
	keep="true" alpha="0.7" width="40" height="prop"   
	onclick="set(visible,false);
	set(plugin[rotate_on].visible,true);
	switch(autorotate.enabled);" 
/>


<plugin name="rotate_on"   
	url="%SWFPATH%/buttons/btn_rotate.png" visible="false"
	align="bottom" edge="center" y="30" x="+90" 
	onhover="showtext(Jatka pyörimistä,infostyle)" blendmode="screen"  		
	onover="set(plugin[rotate].blendmode,add);" 
	onout="set(plugin[rotate].blendmode,screen);" 
	keep="true" alpha="0.7" width="40" height="prop"   
	onclick="set(visible,false);
	set(plugin[rotate_off].visible,true);
	switch(autorotate.enabled);" 
/>


I have made extra URL for the non working version of the buttons here:

http://panoraamakuvat.fi/kuvat/krpano/button-switch-problem
http://www.panoraamakuvat.fi/asiakkaat/J…ton_problem.xml
http://www.panoraamakuvat.fi/asiakkaat/p…ton_problem.xml

joekki

Trainee

  • "joekki" started this thread

Posts: 78

Location: Turku, Finland

Occupation: Panoramic photographer and web site builder

  • Send private message

17

Monday, June 29th 2009, 10:32pm

I have tried locally with a modified html based on your one:

And.......... IT WORKS *attention* *confused*
Huh,
I tried the same myself, and like you said, it worked...??? What's going one? Is it a security thing of the Flash again or what? I just copied the source code to index.html to my desktop with all the files and renamed those, and it worked.. I guess I have to double check the paths, like you said earlier.

NOTE: if you guys are testing with locally, and with external XML URLs, you have to notice that I changed the URLs to the ones I mentioned one post above.

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

18

Monday, June 29th 2009, 10:36pm

Hi Joekki,

Good job. *thumbup* At least you got a way to solve your problem. *attention*

Sorry not to have found why the switch action does not work on your original. *thumbdown*
It is really strange. I would like to really know the reason. *w00t*
The question Using switch when changing button URL - problem is not solved... *cry*

Perhaps somebody out there can tell us the solution
*question* *smile*

At least we got some good time in grating the head. *thumbsup*

Salut.

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

19

Monday, June 29th 2009, 10:41pm

Hi Joekki,

I noticed a new thing now in your new page *unsure* ....
Look at the debugger (pressing the o key)

Source code

1
WARNING: ExternalInterface NOT available


*question* *question*

Salut.

20

Monday, June 29th 2009, 10:45pm

Hi,

yes, it was a path problem,

normally the BASE path is the path where the html is located,
but when there is no html file then the location of the swf is the BASE path,

now the problem - the "url" attributes in the xml are automatically made
relative to the xml itself! this is the reason why the normal buttons/images work in both cases,

BUT - the dynamically changed "url" attributes are NOT automatically made relative to any XML file (because the dynamic code could be locatted in a other XML), they are relative to the BASE path (the path of the HTML or the SWF in your example),

a way to make also the dynamic "url" paths relative is to use the "placerholders",
e.g.

Source code

1
set(plugin[name].url, %SWFPATH%/buttons/image.jpg);


%SWFPATH% is always the path of the krpano.swf file,
this can be used to have always the full correct url, regardless of the BASE path,

I hope I could clear that a little bit

best regards,
Klaus