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

Tuesday, April 17th 2018, 10:13am

how to scroll horizontal text in krpano

Hi all,

I want to scroll horizontal text in krpano, but i don't know how to scroll it,
so if you can, please help me .

text : "「ラ・トゥール新宿ガーデン」の住居エリアは24階から37階。見晴らす先は、全方位絶景です。"


Example : https://flic360.theta360.biz/t/b16aba48-…-0ab03b0c5d26-1

Thank you!

Mael B.

Trainee

Posts: 135

Location: France, Montpellier

  • Send private message

2

Tuesday, April 17th 2018, 11:34am

If a well understand what you want, you just need to do a tween action on the x position of a textfield layer.

3

Wednesday, April 18th 2018, 5:43am

If a well understand what you want, you just need to do a tween action on the x position of a textfield layer.

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
<layer name="mytext"
       type="text"
       align="righttop"
       x="10"
       y="10"
       html="Máy bay chiến đấu Trung Quốc tập trận để nắn gân Đài Loan"
       minwidth="400"
       vcenter="true"
       padding="2"
       wordwrap="true"
       css="data:cssdata1"
       bg="none"
       bgalpha="0.0.0"
       bgborder="0"
       bgroundedge="0"
       bgshadow=""
       txtshadow=""
       mergedalpha="true"
       oversampling="1.0"
       interactivecontent="true"
       onloaded="let_started()"
/>
<data name="cssdata1">
    color:#FFFFFF;
    font-weight:bold;
    font-size:15px;
</data>
<action name="let_started">
    div(per,get(layer[mytext].pixelwidth),stagewidth);
    mul(percent,per,-100);
    Math.ceil(cccc,percent);
    txtadd(txt_percent,get(cccc),'%');
    set(layer[mytext].x,get(txt_percent));
    tween(layer[mytext].x,100%,50,easeOutQuad,call_back_let_started)
</action>
<action name="call_back_let_started">
    div(per,get(layer[mytext].pixelwidth),stagewidth);
    mul(percent,per,-100);
    Math.ceil(cccc,percent);
    txtadd(txt_percent,get(cccc),'%');
    set(layer[mytext].x,get(txt_percent));
    tween(layer[mytext].x,100%,50,easeOutQuad,let_started)
</action>


Thank you. *smile*

This post has been edited 5 times, last edit by "khuong.dv" (Apr 20th 2018, 2:34am)


4

Friday, April 20th 2018, 2:41am

- How to get width of layer when i set with="auto" ?
- I cannot get width, it always return null when use " layer[mytext].width" ?


Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<layer name="mytext"
       type="text"
       align="righttop"
       x="10"
       y="10"
       html="しばらくすると、テキストが右から左に水平にスクロ: <?php echo $image['Image']['id']; ?>"
       width="auto"
       vcenter="true"
       padding="2"
       wordwrap="true"
       css="data:cssdata1"
       bg="none"
       bgalpha="0.0.0"
       bgborder="0"
       bgroundedge="0"
       bgshadow=""
       txtshadow=""
       mergedalpha="true"
       oversampling="1.0"
       interactivecontent="true"
       onloaded="let_started()"/>

5

Friday, April 20th 2018, 8:54am

https://krpano.com/docu/xml/#layer.pixelwidth
https://krpano.com/plugins/textfield/#onautosized

<layer name="mytext"
type="text"
onautosized="trace(pixelwidth);"
....
/>

This post has been edited 1 times, last edit by "indexofrefraction" (Apr 20th 2018, 9:08am)