Sie sind nicht angemeldet.

1

Dienstag, 10. Januar 2017, 14:27

Button menu changing color

Hi,

I'm trying to add a function to change the color of a button in a menu (hover/ in the corresponding panorama)

Quellcode

1
<layer name="welcometext"  keep="true" url="%SWFPATH%/graphics/textfield.swf" align="center" x="-350" y="0" html="Client[br]welcome[br]area" visible="true" autoheight="true" background="false" border="false" css="text-align:center; color:0x6786c1; font-family:Arial; font-weight:bold; font-size:20px;" " onclick="hit(); loadscene(pano1,null,MERGE,BLEND(0.5));"/>


I have 6 button like this one.
I want to change color when the mouse is over:
onover="color:0xffffff; did'nt work

I want to change color when we are in a specific scene (the corresponding button)
if scene[name].name == "pano1" , tween(layer[welcometext].color:0xffffff);
Perhaps it's not the good way to do it
Any idea ?
Thanks

Jeronicoz

Beiträge: 1 117

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : the cms4vr owner

  • Nachricht senden

2

Dienstag, 10. Januar 2017, 14:59

Maybe this piece of code?

onover="set(css, color:0xffffff;)";


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

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

cms4vr team *thumbsup*

3

Dienstag, 10. Januar 2017, 15:09

Hi Piotr,

It's changing the color you're right but all the other specifications (text-align, font-family, fontsize...) disappear.
Thanks

Beiträge: 1 117

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : the cms4vr owner

  • Nachricht senden

4

Dienstag, 10. Januar 2017, 16:34

Set whole css settings

Quellcode

1
onover="set(css, text-align:center;color:0xffffff;font-family:Arial;font-weight:bold;font-size:20px;)";

it should work


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

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

cms4vr team *thumbsup*

5

Dienstag, 10. Januar 2017, 16:43

Perfect,
It remains for me to find how to change the color at the button when it is in is own panorama...

Thanks Piotr

Beiträge: 1 117

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : the cms4vr owner

  • Nachricht senden

6

Dienstag, 10. Januar 2017, 17:34

*squint* *thumbup*

kind regards

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

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

cms4vr team *thumbsup*