Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperLicht
the scene interaction with page controls

Registered User
2013-05-03 00:39:24

hi again men
in webgl app. we have two things scene created by the coppercube editor and the page that host the scene ,the question is how to interact controls with the scene and the scripts attached to the scene......for example if i have created variable called nomofplayers and on each entrance to the page ( logging to the page)the nomber increase by one ,,,so i put a hidden input control and increase the value by 1 each time a player log in to the page ,, now i want sent this value to variable not object ,, this variable is used in an object behavior ,, so that there is an action will be called when the variable changed ,,,how to send data from page to variable created in the scene...

2013-05-03 06:10:30

You can use the CopperCube variable interface for this:

var yourVar = CL3D.CopperCubeVariable.getVariable('thenameofyourvar', true);

// now, you can write or read the variable, using this:
yourVar.setValueAsString("hello world!");
// or reading
var content = yourVar.getValueAsString();

Create reply:

Posted by: (you are not logged in)

Enter the missing letter in: "Int?rnational" (you are not logged in)




Possible Codes

Feature Code
Link [url] [/url]
Bold [b]bold text[/b]
Image [img][/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]



Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact