title: Phaser: how to load assets after preload?
body: <p>I wonder whether it would be possible to load an asset dynamically at a given time in Phaser rather than loading everything in the preload function. The reason for this is simple: I have a game with three different levels, all of which have different background songs; and so I'd rather only load a single song at startup to reduce loading times.</p>
  
  <p>Right now, my preload function looks like this:</p>
  
  <pre><code>preload: function()
  {
      game.load.audio('pixel_world',
          ['assets/music/pixel_world_lo.ogg', 'assets/music/pixel_world_lo.mp3']);
      game.load.audio('second_source',
          ['assets/music/second_source_lo.ogg', 'assets/music/second_source_lo.mp3']);
      game.load.audio('reboot_complete',
          ['assets/music/reboot_complete_lo.ogg', 'assets/music/reboot_complete_lo.mp3']);
      game.load.image('pickup', 'assets/img/pickup.png');
  }
  </code></pre>
  
  <p>I tried moving one of the game.load.audio() calls to the create function instead:</p>
  
  <pre><code>create: function()
  {
      game.load.audio('pixel_world',
          ['assets/music/pixel_world_lo.ogg', 'assets/music/pixel_world_lo.mp3']);
      // good things follow...
  }
  </code></pre>
  
  <p>However, the following calls fail:</p>
  
  <pre><code>this.cache.isSoundDecoded(level.song)
  // Phaser.Cache.isSoundDecoded: Key "pixel_world" not found in Cache.
  
  song = game.add.audio(level.song);
  // Phaser.Cache.getSound: Key "pixel_world" not found in Cache.
  </code></pre>
  
  <p>Do you know how I can get this to work, or any other way to ensure that the three songs are not loaded at game startup? Thank you!</p>