Hi.
I faced a strange problem. I want to put the textfield into my virtual tour, but could not sucseed in it. I paste a code from the Textfield sample from the krpano 1.0.7 folder into a new file. When I simply add a
instead of
Code
<view fisheyefovlink="1.5" />
<preview type="grid(cube,32,32,256,0x000000,0x778899,0x000000);" details="8" />
everything works fine.
But when I add the SCENE tags, the desired OPEN HTML TEXTFIELD button disapears. Not only the button, but the texfield does not work at all. I tried to associate the "htmltext" plugin with the other button, but it does not appear, once the scene tag is used.
I use krpano 1.0.8. Maybe that is the issue?
I attach the code, that does not work for me. I can not imagine what is disturbing there to the texfield to appear:
Code
<krpano version="1.0.8" onstart="action(start)">
<action name="start">
<!-- load 1. scene on start -->
loadscene(scene1, null, MERGE);
</action>
<scene name="scene1" onstart="action(startscene);">
<action name="startscene">
</action>
<view hlookat="72" vlookat="0" fov="75" fovmax="90" />
<image type="SPHERE">
<sphere url="../../../Scenes/Velux/scene1.jpg" />
</image>
</scene>
<data name="buttontext">
<p align="center">
<font face="arial" size="+4">
<b><i>OPEN HTML TEXTFIELD</i></b>
</font>
</p>
</data>
<plugin name="button" url="%SWFPATH%/plugins/textfield.swf"
align="center" width="200" height="30" x="0" y="150" children="false"
html="data:buttontext"
background="false"
textglow="4"
textglowcolor="0xFFFFFF"
textshadow="3"
autosize="center"
onclick="action(show_html_field);"
/>
<action name="show_html_field">
set(plugin[button].enabled,false);
set(plugin[htmltext].y,-1500);
tween(plugin[button].alpha,0,,,set(plugin[button].visible,false));
tween(plugin[htmltext].alpha,1,0);
tween(plugin[htmltext].textblur,0,0);
tween(plugin[htmltext].blur,0,0);
set(plugin[htmltext].visible,true);
set(plugin[htmltext].enabled,true);
tween(plugin[htmltext].y,0);
</action>
<action name="showbutton">
set(plugin[button].visible,true);
set(plugin[button].enabled,true);
tween(plugin[button].alpha,1);
</action>
<plugin name="htmltext" url="%SWFPATH%/plugins/textfield.swf"
align="center" width="500" height="300" x="0" y="-1100" visible="false"
html="data:html1"
css="data:css1"
roundedge="0"
borderwidth="1"
bordercolor="0xFFFFFF"
backgroundcolor="0xFFFFFF"
selectable="false"
shadow="5"
autosize="center"
/>
<plugin name="htmltext2" url="%SWFPATH%/plugins/textfield.swf"
align="righttop" width="250" height="100" x="20" y="20"
html="data:html2"
css="data:css2"
borderwidth="0"
bordercolor="0xFF0000"
backgroundcolor="0xFFFFFF"
alpha="0.0"
blur="8"
textblur="8"
glow="6"
glowcolor="0xFFFFFF"
shadow="5"
autosize="center"
visible="false"
/>
<action name="move">
plugin[%1].changeorigin(lefttop,lefttop);
tween(plugin[%1].x,0,1,easeoutquad);
tween(plugin[%1].y,0,1,easeoutquad,action(move2,%1));
</action>
<action name="move2">
plugin[%1].changeorigin(rightbottom,rightbottom);
tween(plugin[%1].x,0,1,easeoutquad);
tween(plugin[%1].y,0,1,easeoutquad,action(moveback,%1));
</action>
<action name="moveback">
plugin[%1].changeorigin(center,center);
tween(plugin[%1].x,0,1,easeoutquad);
tween(plugin[%1].y,0,1,easeoutquad);
</action>
<action name="hidewindow">
set(plugin[%1].enabled,false);
tween(plugin[%1].alpha,0);
tween(plugin[%1].blur,20);
tween(plugin[%1].textblur,20,,,set(plugin[%1].visible,false));
</action>
<action name="hidewindow2">
set(enabled,false);
tween(alpha,0);
tween(blur,20);
tween(textblur,20,,,set(visible,false));
</action>
<action name="show_html_field2">
set(plugin[htmltext2].enabled,true);
tween(plugin[htmltext2].blur,8,0);
tween(plugin[htmltext2].textblur,8,0);
set(plugin[htmltext2].blur,8);
set(plugin[htmltext2].textblur,8);
set(plugin[htmltext2].visible,true);
tween(plugin[htmltext2].blur,0);
tween(plugin[htmltext2].textblur,0);
tween(plugin[htmltext2].alpha,0.8);
</action>
<action name="loadpano">
action(hidewindow,htmltext);
action(showbutton);
loadpano(%SWFPATH%/examples/sphere/sphere_example.xml,null,KEEPBASE,BLEND(1));
</action>
<data name="html1">
<p align="center">
<font face="times" size="+4">
<b>Hello from Actionscript HTML</b>
</font>
</p>
<a href="event:action(loadpano);">
<img src="image.jpg" />
</a>
styles test:<br/>
<b>bold</b><br/>
<i>italic</i><br/>
<u>underlined</u><br/>
<br/>
links test:<br/>
<a href="http://www.krpano.com">open krpano site</a><br/>
<a href="event:lookto(0,0,130);lookto(90,0,150);">do some lookto actions</a><br/>
<a href="event:action(move,htmltext);">click to move field</a><br/>
<a href="event:action(show_html_field2);">open second field</a><br/>
<br/>
color test:<br/>
<font color="#FF0000">red </font><font color="#00FF00">green </font><font color="#0000FF">blue</font><br/>
<br/>
<br/>
<br/>
list test:<br/>
<li>
<ul>list1</ul><br/>
<ul>list2</ul><br/>
<ul>list3</ul><br/>
</li>
<p align="left">
left align test left align test left align test left align test left align test<br/>
left align testleft align testleft align test<br/>
</p>
<p align="center">
center align test center align test center align test center align test center align test<br/>
center align test center align test center align test<br/>
</p>
<p align="right">
right align test right align test right align test right align test right align test<br/>
right align test right align test right align test<br/>
</p>
<p align="center">
<font size="+4">
<a href="event:action(hidewindow,htmltext);action(showbutton);">close window</a><br/>
</font>
</p>
</data>
<data name="css1">
a { text-decoration:underline; color:#110088; font-weight:bold; }
a:hover { color:#885500; }
</data>
<data name="css2">
<include url="externdata.css" />
</data>
<data name="html2">
<include url="externdata.html" />
</data>
<plugin name="editor" url="%SWFPATH%/plugins/editor.swf" keep="true" />
<plugin name="options" url="%SWFPATH%/plugins/options.swf" keep="true" />
<!-- set the path to the default lensflare image -->
<lensflareset name="DEFAULT" url="%SWFPATH%/plugins/krpano_default_flares.jpg" />
</krpano>
Alles anzeigen