You are not logged in.

rey

Trainee

  • "rey" started this thread

Posts: 48

Location: Tallinn, Estonia

Occupation: 360VR photographer

  • Send private message

1

Saturday, May 1st 2021, 3:49pm

Setting onovercrop/ondowncrop in action

I tried to set onovercrop/ondowncrop in action:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
<layer name="map_button" crop="300|0|50|50" onovercrop="350|0|50|50" ondowncrop="300|0|50|50" onclick="showmap()" />
<action name="showmap">
    if(show,
        set(layer[map_button].crop, "800|0|50|50");
        set(layer[map_button].onovercrop=, "850|0|50|50");
        set(layer[map_button].ondowncrop=, "800|0|50|50");
    ,
        set(layer[map_button].crop, "300|0|50|50");
        set(layer[map_button].onovercrop=, "350|0|50|50");
        set(layer[map_button].ondowncrop=, "300|0|50|50");
    );
</action>


https://youtu.be/o2N7fxefItQ

Crop work, but onovercrop/ondowncrop - not. Why?

Tuur

Sage

Posts: 3,839

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

2

Saturday, May 1st 2021, 3:56pm

Hi,

..just a sloppy mistake ;-)

set(layer[map_button].onovercrop=, "850|0|50|50");
must be

set(layer[map_button].onovercrop, 850|0|50|50);

same for ondowncrop obviously *g*




even better like:

Source code

1
2
3
4
5
6
7
<action name="showmap">
    if(show,
        set(layer[map_button], crop=800|0|50|50, onovercrop=850|0|50|50,  ondowncrop=800|0|50|50);
    ,
        set(layer[map_button], crop=300|0|50|50, onovercrop=350|0|50|50, ondowncrop=300|0|50|50);
    );
</action>



Tuur *thumbsup*

This post has been edited 1 times, last edit by "Tuur" (May 1st 2021, 4:09pm)


rey

Trainee

  • "rey" started this thread

Posts: 48

Location: Tallinn, Estonia

Occupation: 360VR photographer

  • Send private message

3

Saturday, May 1st 2021, 4:03pm

Oh, sure! Thank you Tuur! *smile*