Forum Discussion
AVT-Digital
4 years agoCommunity Member
Execute JavaScript - passing object to script?
Hi,
Does the Execute JavaScript pass the object which executed the script, to the script in any way?
I'm trying to get hold of the object in JavaScript which calls the script in a easy way so if...
WaltHamilton
4 years agoSuper Hero
You can set a variable in SL, and Get it in js.
For example, Adjust variable CallingObject set value = slide6button 1 when user clicks Button 1.
Execute js when user clicks Button 1.
Then js Gets CallingObject.
Seems pretty easy to me. After all, you have to create the trigger to execute the script, and the js is going to have the code to handle whatever calls it. All you have to do is to add the trigger to set the variable.