Hello,
I just came across an issue with soundinterface's oncomplete event.
I have a simple hotspot which plays a sound.
Code
<hotspot onclick="hs_clicked('myString', 10);"></hotspot>
<action name="hs_clicked" scope="local" args="var1, var2">
js(console.log(get(caller.name))); // output: hs1
js(console.log(get(var1), get(var2))); // output: myString, 10
tween(caller.ath, 30, 1, default, on_complete1(get(var1), get(var2)));
playsound(mysound, "sound.mp3", false, 1, on_complete2(get(var1), get(var2)));
</action>
<action name="on_complete1" scope="local" args="var1, var2">
js(console.log(get(var1), get(var2))); // output: myString, 10
js(console.log(get(caller.name))); // output: (nothing or null?)
</action>
<action name="on_complete2" scope="local" args="var1, var2">
js(console.log(get(var1), get(var2))); // output: (nothing or null?)
js(console.log(get(caller.name))); // output: mysound
</action>
Display More
I wish to pass arguments (var1, var2) in "hs_clicked" action to "on_complete2" action.
However, soundinterface 'oncomplete' seems to work differently from tween 'donecall'.
Is there any way to pass parameters via playsound's oncomplete action?
Cheers,
hyung