title: Make a javascript function inherit a prototype
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/548487/how-do-i-make-a-callable-js-object-with-an-arbitrary-prototype">How do I make a callable JS object with an arbitrary prototype?</a>  </p>
  </blockquote>
  
  
  
  <p>Let's say we have multiple individual functions that we can call individually in their own context; But they also inherit some other object's prototype. Like this:</p>
  
  <pre class="lang-js prettyprint-override"><code>//Here is the parent object:
  var Human = function(){
      this.isAlive = true;
  };
  Human.prototype.say = function(what){
      alert(what + '!');
  };
  
  //These will inherit from it:
  var ninja = function() {
      alert("I'm a ninja!");
  }
  var samurai = function(){
      alert("I'm a samurai!");
  }
  
  //Now, how can I make ninja and samurai behave like this:
  ninja(); //I'm a ninja!
  samurai(); //I'm a samurai!
  ninja.say('Hello'); //Hello!
  
  //And they should keep their inheritance. Like:
  Human.prototype.die = function(){
      this.isAlive = false;
  }
  
  ninja.die();
  ninja.isAlive == false;
  
  samurai.isAlive == true;
  </code></pre>
  
  <p>In other words, is there a way to have two objects that inherit another object's prototype, but are still callable as functions?</p>
  
  <p><strong>Note</strong>: I'm gonna use this in Adobe ExtendScript (aka Crippled Javascript), and it doesn't know much modern javascript. Like, Object.defineProperty doesn't work in it. So, is there a normal, standard way to do this?</p>