<krpano version="1.0.8">

	<include url="../../global.xml" />
	
	<view fovmax="120" />
	
	<preview type="grid(cube,32,32,256,0x000000,0x778899,0x000000);" details="8" />

	<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%%panos/kirche/kirche.xml,null,KEEPBASE,BLEND(2));
	</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>
	
</krpano>

