title: Associating sprites in a container - Pixi.js
body: <p>Let's suppose that I have 2 classes which look alike:</p>
  
  <pre><code>//one class
      function classA() {
      var texture = PIXI.Texture.fromImage("someImage");
      PIXI.extras.TilingSprite.call(this, texture, 224, 219);
  
      this.position.x = 0;
      this.position.y = 0;
      this.tilePosition.x = 0;
      this.tilePosition.y = 0;
      }
  
      classA.constructor = classA;
      classA.prototype = Object.create(PIXI.extras.TilingSprite.prototype);
  
  //another class
      function classB() {
      var texture = PIXI.Texture.fromImage("anotherImage");
      PIXI.extras.TilingSprite.call(this, texture, 36, 42);
  
      this.position.x = 0;
      this.position.y = 0;
      this.tilePosition.x = 0;
      this.tilePosition.y = 0;
      }
  
      classB.constructor = classB;
      classB.prototype = Object.create(PIXI.extras.TilingSprite.prototype);
  </code></pre>
  
  <p>In another file, I create 1 instance of classA and 3 from classB and add all of them in a container:</p>
  
  <pre><code>container = new PIXI.Container();
  renderer = PIXI.autoDetectRenderer(224, 219, {view:document.getElementById("some-canvas")});
  
  a = new classA();
  container.addChild(a);
  b1 = new classB();
  container.addChild(b1);
  b2 = new classB();
  container.addChild(b2);
  b3 = new classB();
  container.addChild(b3);
  </code></pre>
  
  <p>I wanted to associate in some way the classB to classA, so that I don't need to create 3 instances of classB everytime I create 1 instance of classA (in another words, I would like do perform one addChild() function per class instantiation). Is that possible?</p>