<p>I embedded a swf in my html page, but I would like it to swap to another swf when I clicked on a button in html. I used swfobject.js to embed the swf, and I use prototype to write the javascript. I thought I can just do this</p>

<pre><code>$('movie').value = 'swf/bhts.swf';
alert($('movie').value);
</code></pre>

<p>the value did change to swf/bhts.swf, but it is still playing the original swf file...
this is the code I use to embed swf</p>

<pre><code>&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="530" height="298" id="flashcontent"&gt;
&lt;param id="movie" name="movie" value="swf/trailer.swf" /&gt;
&lt;/object&gt;
</code></pre>

<p>thanks.</p>

Using swfObject:
```
```
<div id='flashContent'>
</div>

<script type='text/javascript'>    
    // Setup your initial flash 
    var so = new SwfObject(.....);
    so.write ('flashContent');

    // Some event handler
    someElement.onclick = function ()
    {
         // Load up the new SWF
         so = new swfObject(....);
         so.write('flashContent');
    }
</script>
```
```