this is what I got:
What I want to be able to do is call "House.build.twostory()" but I keep getting "House.build.twostory() is not a function".
Does anyone know how I would extend the build method so I can make direct calls to functions within it, not executing the rest of the code? When I call House.build() and have the code for "onestory" outside a function it works fine, just cant figure out how to code it so I can make th direct call to the function inside without passing a "House.build(onestory)" and doing an if/elseif system.
Thanks
Code:
var House = {
obj : null,
init : function()
{
// do something
},
build : function()
{
function onestory()
{
//do something
}
function twostory()
{
//do somthing
}
}
};
House.init();
What I want to be able to do is call "House.build.twostory()" but I keep getting "House.build.twostory() is not a function".
Does anyone know how I would extend the build method so I can make direct calls to functions within it, not executing the rest of the code? When I call House.build() and have the code for "onestory" outside a function it works fine, just cant figure out how to code it so I can make th direct call to the function inside without passing a "House.build(onestory)" and doing an if/elseif system.
Thanks