 samehhelaly Registered User |
Quote
|
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...
|
 niko Moderator |
Quote
|
2013-05-03 06:10:30 |
|
You can use the CopperCube variable interface for this: http://www.ambiera.com/copperlic...
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();
|