I put swf in my html page, but I would like it to change to another swf when I clicked the button in html. I used swfobject.js to insert swf and I use a prototype to write javascript. I thought I could just do it
$('movie').value = 'swf/bhts.swf'; alert($('movie').value);
the value changed to swf / bhts.swf, but it still plays the original swf file ... this is the code I use to insert swf
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="530" height="298" id="flashcontent"> <param id="movie" name="movie" value="swf/trailer.swf" /> </object>
thank.
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>
SWFObject? swfobject.embedSWF SWF HTML , , Flash- URL-.
SWF URL-, . ID Flash, -
var swf = getElementById("flash_id"); swf.LoadMovie(0, "http://example.com/newSwfUrl.swf");
, Flash- , 0 ( ). Flash-, Flash 8 .
Source: https://habr.com/ru/post/1699587/More articles:Safari Invisible Scrollbar Templates - htmlIs there a standard way to store vector information in a database? - databaseread com port - c #Select specific rows with SQL Server XML column type - xmlDatabase schema design - database-designregex for an alphanumeric word, must be 6 characters long - c #New for functional programming - functional-programmingJava Alert Framework - javaVb6: tab delimited separator text - parsingC # performance: type comparison and string comparison - performanceAll Articles