instanceProto.CreateInst = function (objtype,x,y,_layer)
{
var layer = (typeof _layer == "number")?
this.runtime.getLayerByNumber(_layer):
(typeof _layer == "string")?
this.runtime.getLayerByName(_layer):
_layer;
// call system action: Create instance
cr.system_object.prototype.acts.CreateObject.call(
this.runtime.system,
objtype,
layer,
x,
y
);
return objtype.getFirstPicked(); // return the created instance
};
Reference
No comments:
Post a Comment