title: Three JS object load, put a color to an object
body: <p>I'm trying to put an color to a object in three js.
  Tried alot of different things but it didnt work.</p>
  
  <pre><code>var objectLoader = new THREE.ObjectLoader();
  objectLoader.load("hoesje/hoesje.json", function ( object ) {
      scene.add( object );
  });
  </code></pre>
  
  <p>I hope someone can help me out, thanks.</p>
  
  <pre><code>var loader = new THREE.OBJLoader();
  loader.addEventListener( 'load', function ( event ) {
      var object = event.content;
      object.traverse( function ( child ) {
          if ( child instanceof THREE.Mesh )
              child.material.color.setRGB (1, 0, 0);
      });
      scene.add( object );
  });
  loader.load( 'hoes.obj' );
  </code></pre>
  
  <p>but then I get this error : TypeError: loader.addEventListener is not a function</p>
  
  <pre><code>var loader = new THREE.OBJLoader();
  loader.load( 'load', function ( event ) {
      var object = event.content;
      object.traverse( function ( child ) {
          if ( child instanceof THREE.Mesh )
              child.material.color.setRGB (1, 0, 0);
      });
      scene.add( object );
  });
  loader.load( 'hoes.obj' );
  </code></pre>
  
  <p>I did change .addEventListener to .load but it give me the follow error
  NS_ERROR_DOM_BAD_URI: Access to restricted URI denied</p>
  
  <pre><code>    var objectLoader = new THREE.ObjectLoader();
  objectLoader.load("hoesje/hoesje.json", function ( object ) {
  scene.add( object );
  } );
  </code></pre>
  
  <p>The code above is my working code to load an model in ThreeJS, in this code I would like to implent a function to change to color..any ideas?</p>