Sie sind nicht angemeldet.

1

Freitag, 24. Oktober 2014, 04:27

tween action support individual radius values for each edge?

tween action support individual radius values for each edge?

i try,but it did not work

Zitat

tween(layer[text].roundedge,'20 10 0 20');

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »tmhok« (24. Oktober 2014, 06:04)


Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

2

Freitag, 24. Oktober 2014, 20:12

I doubt that would work.
I think you can do this using an asyncloop loop and txtadd to create your values manually.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

3

Freitag, 24. Oktober 2014, 20:56

Hi,

the tween action itself can basically only tween numbers, not texts that contains several numbers, but you could use a special action that 'parses' the roundedge parameter into separate values and then tweens them and rebuilds the roundedge parameter each time using the update callback of the tween action.

Here helper actions for this case (they work only when using all 4 roundedge parameters):

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<action name="parse_roundedge">
    indexoftxt(sp1, '%1', ' ');
    add(sp1,1);
    indexoftxt(sp2, '%1', ' ', get(sp1));
    add(sp2,1);
    indexoftxt(sp3, '%1', ' ', get(sp2));
    add(sp3,1);
    sub(len1, sp1, 1);
    sub(len2, sp2, sp1);
    sub(len3, sp3, sp2);
    subtxt(e1, '%1', 0, get(len1));
    subtxt(e2, '%1', get(sp1), get(len2));
    subtxt(e3, '%1', get(sp2), get(len3));
    subtxt(e4, '%1', get(sp3), 20);
</action>

<action name="tween_roundedge">
    parse_roundedge(%2);
    txtadd(target, get(e1),'|',get(e2),'|',get(e3),'|',get(e4));
    parse_roundedge(get(%1));
    tween(e1|e2|e3|e4, get(target), %3, %4, %5, txtadd(%1, get(e1),' ',get(e2),' ',get(e3),' ',get(e4)) );
</action>


and here an usage example (could be used for the textfield roundedge or container bgroundedge setting):

Quellcode

1
2
3
bgroundedge="50 50 50 50"
onover="tween_roundedge(bgroundedge, 0 200 0 200, 0.5, linear);"
onout="tween_roundedge(bgroundedge, 50 50 50 50, 0.5, linear);"


Best regards,
Klaus

4

Samstag, 25. Oktober 2014, 00:37

thanks you!klaus!very useful! *thumbsup*