Change the flash by clicking the button

I'm a real beginner! I am on Windows Vista and IE7. Here's what I would like to do: 1. I have two flash files: page1.swf and page2.swf. It's just a page from a magazine. 2. Show Page1 3. Click the "Change Page" button; 4. When I click the button; display page 2 instead of page 1 (only page 2, not both pages) What is it. If anyone can give me a script to do this, I would really appreciate it.

-1


source to share


2 answers


this function changes the flash memory built into 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 needed.

0


source


To manipulate SWF objects in your pages using JavaScript, I recommend using SWFObject .



Also check this question: How to use javascript to swap swf in html?

0


source







All Articles