Sie sind nicht angemeldet.

1

Mittwoch, 25. August 2021, 23:34

Combobox Visible False

Hello there
I'm making a mistake somewhere, but where?
I want to hide combobox on mobile,

Quellcode

1
2
3
4
<action name="startup" autorun="onstart">	
 .........	
 tween(plugin[combobox].visible,false); 
</action>


Quellcode

1
2
3
4
<action name="startup" autorun="onstart">
.........
tween(plugin[combobox].visible.mobile,false); 
</action>



I would be glad if you can help.

Beiträge: 1 117

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : the cms4vr owner

  • Nachricht senden

2

Donnerstag, 26. August 2021, 10:06

The visible is a BOOL variable and can take only 2 values - true/false.
If you want to turn off the plugin smoothly then use the alpha property.

Quellcode

1
2
3
4
5
<plugin name="combobox" autoalpha="true" ... />

<action name="startup" autorun="onstart"> 
tween(plugin[combobox].alpha,0); 
</action>



Piotr
Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*

3

Donnerstag, 26. August 2021, 11:10

The visible is a BOOL variable and can take only 2 values - true/false.
If you want to turn off the plugin smoothly then use the alpha property.

Quellcode

1
tween(plugin[combobox].alpha,0);



Piotr</plugin>

Thanks for the reply Piotr.

How can I write this for mobile?

I wrote it like this, it didn't work :(

Quellcode

1
tween(plugin[combobox].alpha.mobile,0); 

Beiträge: 1 117

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : the cms4vr owner

  • Nachricht senden

4

Donnerstag, 26. August 2021, 11:46

in this way:

Quellcode

1
if(device.mobile, tween(plugin[combobox].alpha,0));



Piotr *thumbup*
Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*

5

Donnerstag, 26. August 2021, 14:48

Thank you Piotr.
so glad to have you :)

Muhammed