Okay...

I've come up with code that's "working" in that it changes the source
correctly, except that it doesn't change the display. Viewing "Generated
source" from within the Dev toolbar in FF shows that the values are changing
correctly. I also altered the code slightly to work with an image instead
and it works like a charm.

Anyone have any ideas? By the way, all paths are correct.
------------
<html>
<head>
<title> new document </title>
<script type="text/javascript" src="jquery.js"></script>
<script language="JavaScript">
<!--
$(document).ready(function(){
        $("a").click(function(){
                var mySrc = $(this).href();
                $('param').val(mySrc);
                $('embed').src(mySrc);
                return false;
        });
});
//-->
</script>
</head>
<body>
<a href="red.swf" class="red">Load red</a>&nbsp;&nbsp;
<a href="blue.swf" class="blue">Load blue</a>&nbsp;&nbsp;
<a href="yellow.swf" class="yellow">Load yellow</a>
<br /><br />
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.ca
b#version=6,0,0,0" width="100" height="100">
        <param name="movie" value="red.swf">
        <embed src="red.swf" quality="high" width="100" height="100" 
name="movie"
align="" type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer";>
</object>
</body>
</html>
------------

<!----------------//------
andy matthews
web developer
certified advanced coldfusion programmer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--------------//--------->

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Andy Matthews
Sent: Tuesday, December 12, 2006 9:33 AM
To: [jQuery]
Subject: [jQuery] Dynamically changing the source of SWF call


I'm looking to try and change the source of a Flash movie using jQuery. I'm
working on doing it myself, but to be honest, I'm not sur eI'll be able to
figure it out, so I'm going to ask you guys.

Say mc_01.swf is the initial SWF that's loaded. I want to be able to click a
button/text link labeled "two" and have mc_02.swf load in place of
mc_01.swf. I want to be able to do  this for other buttons as well. I think
it should be possible, but I'm just not sure how to proceed.

<!----------------//------
andy matthews
web developer
certified advanced coldfusion programmer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--------------//--------->


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to