Hi!
We have a method:
comp.saveFrameToPng(compTime, fileObj);
I have my custom object block.
Is it possible to clone "saveFrameToPng" method for my custom object?
I've tried:
Function.prototype.clone = function() {
var that = this;
var temp = function temporary() { return that.apply(this, arguments); };
for(var key in this) {
if (this.hasOwnProperty(key)) {
temp[key] = this[key];
}
}
return temp;
};
And then in my custom object:
function block (comp)
{
this.saveFrame = comp.saveFrameToPng.clone();
}
But thin won't work properly
Help me please if this possible.
Thank you in advance!