You are not logged in.

Jaume

Beginner

  • "Jaume" started this thread

Posts: 13

Location: Poland

Occupation: Photogrammetrist

  • Send private message

1

Monday, April 4th 2022, 4:02pm

Welcome window with scrollbars

Hi,
I try to set a welcome layer that shows the basic information about the created virtual tour. I'd like to make this layer scrollable (for mouse and touch screen on mobile devices). I bother to use popup_blur.xml code but it does not work. Below I present my code I wrote:

Source code

1
2
3
4
5
6
7
	<layer name="textbox" type="container" align="center" x="0" y="0" width="50%" height="420" bgcolor="0xcfa541" bgalpha="0.7" bgcapture="true" width.mobile="90%" zorder="2" keep="true" alpha="0" handcursor="false" capture="true" maskchildren="true" onloaded="welcomewindow('html', get(layer[text].content), true);">
    	<layer name="close" url="skin/close.png" align="righttop" x="10" y="10" scale="0.5" zorder="2" rotate="0" onclick="set(layer[textbox].visible,false);" keep="true"/>
    		<layer name="title" style="text" align="top" y="8" width="100%" css="text-align:center; color:#FFFFFF; font-family:Arial; font-weight:bold; font-size:18px;" html="Kawiarnia Magia Cafe" keep="true"/>
    		<layer name="textarea" type="container" align="center" x="0" y="14" width="96%" height="360" bgcolor="0xFFFFFF" bgalpha="0.7" maskchildren="true" keep="true">
    		<layer name="text" style="text" enabled="true" align="lefttop" x="0" y="0" width="100%" autoheight="true" css="color:#000000; font-family:Arial; font-size:15px; padding-top:15px;" html="data:testtext1" keep="true"/>
    	</layer>
    </layer>

Source code

1
2
3
4
5
6
	<action name="welcomewindow"  args="type, content, scrollbars"><![CDATA[
    	if(type == 'html',
    		copy(layer[textbox].datacontent, content);
    		calc(layer[textbox].onloaded, 'add_html_code(get(datacontent),'+scrollbars+');');
    	);
    ]]></action>


Source code

1
<data name="testtext1"><![CDATA[....]]</data>

and I use this action:

Source code

1
<action name="add_html_code" type="Javascript"><![CDATA[...]]></action>

I have no idea what's wrong with this code. Maybe someone has an idea how to change it to make the code work?
Thank you.

Jaume

Beginner

  • "Jaume" started this thread

Posts: 13

Location: Poland

Occupation: Photogrammetrist

  • Send private message

2

Sunday, April 10th 2022, 1:53pm

The problem has been solved out. I've added scrollarea layer:

Source code

1
2
3
<layer name="scrollarea" url="%SWFPATH%/plugins/scrollarea.swf" alturl="%SWFPATH%/plugins/scrollarea.js" align="center" width="96%" height="500" direction="v" mwheel="true"  onhover_autoscrolling="false" keep="true" onloaded="setcenter(0,0);">
    <layer name="text" style="text" enabled="true" align="lefttop" x="0" y="0" width="100%" autoheight="true" css="color:#000000; font-family:Arial; font-size:15px; padding-top:15px;" html="data:testtext1" keep="true" />
</layer>

ramirox3

Intermediate

Posts: 354

Location: La Ceja, Colombia

Occupation: photographer

  • Send private message

3

Sunday, April 10th 2022, 3:27pm

Hi Jaume. I have been watching this thread. Could you assemble the complete code to evaluate it?
Thanks