Dynamically change the URL passed to the YouTube player
<p>Dynamically change the URL passed to the YouTube player</p>

<p>YouTube’s player is great but how can we call this object multiple times in our script and pass a new URL to it each time?</p>

<p>For instance, a single copy of the object would sit in our script either hidden or in a container like so:</p>

<pre><code> &lt;div Style="Position:Absolute; Left:430px; Top:30px;";&gt;
 &lt;object width="350" height="25"&gt;
 &lt;embed src="http://www.youtube.com/v/stCKjZniMsQ?autohide=2&amp;autoplay=0&amp;border=0&amp;cc_load_policy=0&amp;controls=2&amp;fs=0&amp;hd=1&amp;iv_load_policy=3&amp;loop=0&amp;modestbranding=1&amp;rel=1&amp;showinfo=1&amp;showsearch=1"
 type="application/x-shockwave-flash" width="350" height="25"&gt;
 &lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;
</code></pre>

<p>...and then whenever we call it in our script with a nifty function like this it’ll fire up playing the video:</p>

<p>Function CallYouTube(URL) { }</p>

<p>Thanks for your input.</p>
