Hopefully this correction will help get the code at least running.
So, the correct code for the server script declarations section of the application you are using should be:
var oBS:Service = this.GetService("MFramework");
oBS.InvokeMethod ("BuildFramework", this.NewPropertySet(), this.NewPropertySet());
while the following is the correct code for the new method in the browser script of the application you are using:
function BuildFramework()
{
var bsUi = theApplication().GetService("MFramework");
bsUi.InvokeMethod("BuildBsFramework",theApplication().NewPropertySet());
};
I've added this. and theApplication(). in front of the calls to the NewPropertySet() method, which hopefully will help things run.