By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,480 Members | 1,766 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,480 IT Pros & Developers. It's quick & easy.

How to dynamically change a flash movie?

P: n/a
Hi all,

I want to dynamically change a flash movie in an html page. Following
code is working fine in IE, but netscape 4 and 6 it is not working.
Can any one rectify the error:

<HTML>
<HEAD>
<script>
function changeFlash(url){
var d=document;
(d.all)? d.all("flashMov1").movie = url :
d.embeds["flashMov2"].src = url;
}

</script>
</HEAD>
<BODY>
<object id=flashMov1
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
width="200" height="150">
<param name="movie" value="f1.swf">
<param name="quality" value="high">

<EMBED name=flashMov2 src="f1.swf" quality=high
WIDTH="200" HEIGHT="150"
TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</EMBED>
</object>
<p>&nbsp;</p>
<p><a href="javascript: changeFlash('f1.swf')">One </a></p>
<p><a href="javascript: changeFlash('f2.swf')">Two</a></p>
<p><a href="javascript: changeFlash('f3.swf')">Three</a></p>

</BODY>
</HTML>

Thanks in advance
Kiran Makam
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I want to load different flash movies in the same embed tag. But

document.embeds["flashMov2"].src = url;

the above code is not loading new movie in the embed tag? what could be the problem?

Thanks in advance
Kiran Makam
Jul 20 '05 #2

P: 1
I want to load different flash movies in the same embed tag. But

document.embeds["flashMov2"].src = url;

the above code is not loading new movie in the embed tag? what could be the problem?

Thanks in advance
Kiran Makam
plz help me

how to dynamically changing the scr attribute in embed tag.
here i am using falsh .swf file.plz give me some idea
May 6 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.