This method imports the given source and assigns it the specified name. Valid
language values are 'jscript' and 'nativeObject'.
function onSamples()
{
// Import JavaScript file.
if (scene.importCode("js_test", "jscript", "../content/sample.js"))
{
var box = scene.getBoxById("myButton");
if (box)
{
box.addEventHandler("click", "js_test:onClickTest();");
}
}
// Import object from a service.
if (scene.importCode("cpp_test", "nativeObject", "ee://aol/boxelySamples/sampleObject"))
{
var box = scene.getBoxById("myButton2");
if (box)
{
box.addEventHandler("click", "cpp_test:onClickTest();");
}
}
}