I am a real beginner! I'm on Windows Vista and IE7. Here's what I'd like to do: 1. I have two flash files: page1.swf and page2.swf. They are just page from a magazine. 2. Display page1 3. Have a button that says "Change page" 4. When I click the button; display page 2 instead of page 1 (only page 2, not both pages) That's it.If anyone can give me a script to do that I would greatly appreciate it.
A:
this function changes the flash embedded in the element:
function setFlashSrc(newSrc)
{
var flash='<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" WIDTH="210" HEIGHT="210">';
flash+='<PARAM NAME=movie VALUE="'+newSrc+'"><PARAM NAME=quality VALUE=high>';
flash+='<EMBED SRC="'+newSrc+'" QUALITY=high PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" ';
flash+='TYPE="application/x-shockwave-flash" WIDTH="210" HEIGHT="210">';
flash+='</EMBED>';
flash+='</OBJECT>';
document.getElementById("urelement").innerHTML=flash;
}
replace the flash attributes as you need.
mapache
2008-12-03 19:57:47
A:
For managing SWF objects in your pages, using JavaScript I recommend you to use SWFObject.
Check this question also: How to use javascript to swap swf in html?
CMS
2008-12-03 20:13:59