Here's a snippet to look at:
Acts.prototype.SequencerAddSynchronizer = function (callbackName)
{
assert2(cr.plugins_.Function != null, "The 'BHT Step Sequencer' plugin requires the 'Function' plugin.");
// Check that the Function plugin exists.
if (cr.plugins_.Function != null)
{
var callFnc = cr.plugins_.Function.prototype.acts.CallFunction;
var name, plugin;
var runtimeTypes = thisInstance.runtime.types;
for (name in runtimeTypes)
{
plugin = runtimeTypes[name];
if (plugin.plugin.acts.CallFunction == callFnc)
{
this.Official_fnobj = plugin.instances[0];
}
}
}
this.CallbackSynchronizer = callbackName;
}
Acts.prototype.SequencerRemoveSynchronizer = function (callbackName)
{
this.CallbackSynchronizer = null;
}
Acts.prototype.SequencerClear = function ()
{
this.Stop();
this.Clear();
if (this.CallbackSynchronizer != null)
{
var params = [-1, -1, ""];
cr.plugins_.Function.prototype.acts.CallFunction.call(this.Official_fnobj, this.CallbackSynchronizer, params);
var fake_ret = {value:0,
set_any: function(value){this.value=value;},
set_int: function(value){this.value=value;},
set_float: function(value){this.value=value;},
set_string: function(value){this.value=value;},
};
cr.plugins_.Function.prototype.exps.ReturnValue.call(this.Official_fnobj, fake_ret);
console.log(fake_ret);
}
}