method connectObject

bool connectObject(object data,string prefix,string namespace);


Zurückgegebener Wert

This method is used to connect an object function to active X events. Note the disconnectObject method must be called to prevent memory leaks. See the scene::disconnectObject documentation for more information.
function onPresented()
    // Get the object box proxy that holds the ActiveX control.
    var box = scene.getBoxById("myObjectBox");
    if (box)
        // NOTE: If you call connectObject, you MUST call disconnectObject
        // to make sure you do not have any memory leaks.
        // I have imported some JavaScript with the id "js_test".
        scene.connectObject(box.control, "myFunc_", "js_test");

// The ActiveX control in the object box has an event called "Click"
function myFunc_Click()