webvr_exitbutton isn't visible

  • With a click on the screen webvr_showbuttons triggers and normally the webvr_exitbutton and a webvr_setupbutton will be shown at some point on it, but i won't.

    Don't misunderstand webvr_showbuttons is triggered, only the buttons are not visible. If i set a hotspot and call it from this event, it will be shown. The exit button is also rendered in a document node, but its just invisible.

    Do you have any idea how to make it visible?

    // Edit:

    Found out that predefine a layer isn't working.
    If i add a layer:

    Code
    <layer name="g2b_exitbutton" keep="true" vr="true"	
    url="%SWFPATH%/plugins/textfield.swf"	
    html="Exit VR"	
     align="bottom" 	       y="24"	 background="false"	
     css="color:#FFFFFF;text-align:center;"	 onclick="webvr.exitVR();"	
    visible="false"	       />


    and want to show the layer in webvr_showbuttons by calling

    Code
    tween(layer[g2b_exitbutton].visible, true, 0.25);


    the layer won't be shown, otherwise if i define a layer inside the function webvr_showbuttons

    Code
    addlayer(g2b_exitbutton);
    set(layer[g2b_exitbutton].url, '%SWFPATH%/plugins/textfield.swf');
    set(layer[g2b_exitbutton].keep, true);
    set(layer[g2b_exitbutton].align, 'bottom');
    set(layer[g2b_exitbutton].y, 40);
    set(layer[g2b_exitbutton].background, false);
    set(layer[g2b_exitbutton].css, 'color:#FFFFFF;text-align:center;');
    set(layer[g2b_exitbutton].html, 'EXIT VR');
    set(layer[g2b_exitbutton].onclick, 'webvr.exitVR();');
    delayedcall(5.0, removelayer(g2b_exitbutton);)


    everything is working fine beside from its scope.

    Does anyone has an idea how to make a global layer that could be used from more than inside the function?

    Edited 3 times, last by stefans (February 10, 2017 at 10:42 AM).

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!