title: JW Player creating playlist on the fly
body: <p>I am attempting to create a playlist on the fly based on the example shown in the documentation: (http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/16026/loading-a-playlist-into-the-player)</p>
  
  <pre><code>    jwplayer("presentation").setup({
          flashplayer: "/javascripts/jwplayer/player.swf",
          height: 270,
          width: 580,
          file: files[0],
          'playlist.position': "right",
          'playlist.size': 100
      });
  
      for (var k=1;k&lt;files.length;k++)
      {
          var playlist = jwplayer().getPlaylist();
              var newItem = {
                  file: files[k],
                  title: files[k]
              };
              playlist.push(newItem);
              jwplayer().load(playlist);
      }
  </code></pre>
  
  <p>The error I receive is:
  TypeError: Result of expression 's' [undefined] is not an object.</p>
  
  <p>which seems to be caused by var playlist = jwplayer().getPlaylist();</p>
  
  <p>any ideas?</p>