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.

1

Wednesday, August 21st 2013, 8:59am

Draggable text field is not working on iPhone..

I want to make a hotspot show up draggable text field on iphone but it doesn't work.
It works fine on the desktop.
Could you please help to solve this problem?

1. tour.xml

<scene name="scene_AAA" title="AAA" onstart="point();" thumburl="panos/AAA.tiles/thumb.jpg" lat="" lng="" heading="">

<include url="include/scene1.xml" />
.
.
.
<hotspot name="textdrag" url="img/text.png" scale="1.0" ath="14.021" atv="-20.639"
onclick="set(layer[textbox].enabled,true);set(layer[textbox].alpha,1);" />

--------------------------------------------------------------------------------------------------------------------------------------------

2. include/scene1.xml

<action name="draglayer">
if(%1 != dragging,
copy(drag_currentx, x);
copy(drag_currenty, y);
copy(drag_stagex, mouse.stagex);
copy(drag_stagey, mouse.stagey);
set(drag_sx, +1);
set(drag_sy, +1);
if(align == righttop, set(drag_sx,-1); );
if(align == right, set(drag_sx,-1); );
if(align == rightbottom, set(drag_sx,-1); set(drag_sy,-1); );
if(align == bottom, set(drag_sy,-1); );
if(align == leftbottom, set(drag_sy,-1); );
draglayer(dragging);
,
if(pressed,
sub(dx, mouse.stagex, drag_stagex);
sub(dy, mouse.stagey, drag_stagey);
mul(dx, drag_sx);
mul(dy, drag_sy);
add(x, drag_currentx, dx);
add(y, drag_currenty, dy);
delayedcall(0, draglayer(dragging) );
);
);
</action>


<!-- a special action for dragging the text only vertically with a certain range -->
<action name="draglayer_text">
if(%1 != dragging,
copy(drag_currenty, y);
copy(drag_stagey, mouse.stagey);
draglayer_text(dragging,%2);
,
if(pressed,
sub(dy, mouse.stagey, drag_stagey);
add(y1, drag_currenty, dy);
add(y2, y1, pixelheight);
sub(y2, %2);
if(y1 GT 0, set(y1,0));
if(y2 LT 0, sub(y1,y2));
copy(y,y1);
delayedcall(0, draglayer_text(dragging,%2) );
);
);
</action>


<!-- the example layers -->
<layer name="textbox" type="container" align="center" alpha="0.0" enabled="false" visible="true" handcursor="false" x="0" y="0" width="500" height="500"
bgcolor="0x000000" bgalpha="0.7" bgcapture="true" ondown="draglayer();" onclick="set(layer[textbox].visible, false);" >

<layer name="title" url="%SWFPATH%/plugins/textfield.swf" children="true" enabled="false" align="top" y="5" width="100%" autoheight="true"
border="false" background="false"
css="text-align:center; color:#FFFFFF; font-family:Arial; font-weight:bold; font-size:14px;"
html="Textbox" />

<layer name="textmask" type="container" align="lefttop" x="10" y="30" width="480" height="440" bgcolor="0xFFFFFF" bgalpha="1.5" cellpadding="5px" maskchildren="true">

<layer name="text" url="%SWFPATH%/plugins/textfield.swf" children="true" align="lefttop" visible="true" x="0" y="0" width="100%" autoheight="true"
border="false" background="false"
css="text-align:left; color:#000000; font-family:Arial; font-size:15px;"
html="data:textdetail"
ondown="draglayer_text(start,260);" />

</layer>
</layer>

<!-- text html -->

<data name="textdetail">
<p align="center">
<font face="times" size="16px" style="font-family:times; font-size:20px; padding:15px;">
<b>Hello!</b><br/>
</font>
</p>
</data>

This post has been edited 1 times, last edit by "vcpano" (Aug 21st 2013, 11:37am)


2

Wednesday, August 21st 2013, 9:02am

Hi,

you can show a link to the example?

additionally try setting children=false here:
<layer name="text" url="%SWFPATH%/plugins/textfield.swf" children="true" align="lefttop" visible="true" x="0" y="0"

Best regards,
Klaus

3

Wednesday, August 21st 2013, 10:23am

Re:

Thank you for you reply.

I just modified it as you wrote.
Also here is the example link that I'm currently working on;
http://133.242.8.18/sheet/vc-support/3dpvr/pano/sakura.html
(Please click the green information icon)

Draggable layout has set as alpha=0.0 and enabled=true when pano loads the scene,
but it doesn't work well on iPhone.
The Draggable layout is invisible correctly but it seems there is something wrong with 'enabled' set.

Any help is much appreciated.

Thanks.
Best regards

-------------------------------------------------------------------------

the above problem has been solved :)

This post has been edited 6 times, last edit by "vcpano" (Aug 28th 2013, 10:30am)


Similar threads