Sie sind nicht angemeldet.

1

Dienstag, 17. April 2018, 10:13

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!

2

Dienstag, 17. April 2018, 11:34

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

3

Mittwoch, 18. April 2018, 05:43

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*

Dieser Beitrag wurde bereits 5 mal editiert, zuletzt von »khuong.dv« (20. April 2018, 02:34)


4

Freitag, 20. April 2018, 02:41

- 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

Freitag, 20. April 2018, 08:54

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

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

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »indexofrefraction« (20. April 2018, 09:08)