Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Im trying to change a 2d node width with execute javascript. but i have not find much help about it.. I tried this ccbSetSceneNodeProperty(this, 'Width (percent)', 1) but it did not work |
||||
|
for me it works. i tested it with 2doverlay when click on it then execute javascript. (that means currentnode will be overlay then) ccbSetSceneNodeProperty(ccbGetCurrentNode(), 'Width (percent)', 1); Depends what is THIS means in your script. Also did you got any error printed on log? |
||||
|
hi sven thanks for your reply and help I did not know what to put instead of "this" I was adding 2d node that changed width by variable |
||||
|
wrote: hi sven thanks for your reply and help I did not know what to put instead of "this" I was adding 2d node that changed width by variable You need to know what to put there -otherwise you cant properly use it. You can specify it with function "getfromname": var myTHIS = ccbGetSceneNodeFromName("MY-THIS-NAME-HERE"); ccbSetSceneNodeProperty(myTHIS, 'Width (percent)', 1); Check here for functions and usage: https://www.ambiera.com/coppercu... |
||||
|
yeah thats why i was asking for help did not find any info. thanks again for your help and suggestion |
|