Note: The Wmode property value of the Flash object must be set to Opaque.
1, through the HTML for Flash add links
This is the way I recommend it, because we can add a very elegant link to flash without considering the flash factor.
1-1. Add the onclick event directly to the button to open the specified page:
The code is as follows |
Copy Code |
<button style= "Width:225;height:76;border:none;background:transparent" onclick= "window.open (', ' _blank ')" hidefocus> <object classid= "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase= "http://download.macromedia.com/pub/ "Width=" height= "shockwave/cabs/flash/swflash.cab#version=6,0,29,0" > <param name= "movie" Value= "/images/head/bbs.swf" > <param name= "wmode" value= "Opaque" > <param name= "Quality" value= "High" > <embed src= "/bbs.swf" Quality= "High" "Http://www.macromedia.com/go/getflashplayer" type= "Application/x-shockwave-flash" width= "pluginspage=" height = "Wmode=" "Opaque" ></embed> </object> </button> |
1-2. The code in Method 1 runs after the button is clicked, the Flash in the button has a sinking action, if you want to cancel this action, you can disable the button's interactivity, and then use the standard a tag to do the link, the code is as follows:
code is as follows |
copy code |
<a href= "http://www.flash8.com" Hidefocus><button disabled style= "Width:225;height:76;border:none" > <object classid= "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase= "http://download.macromedia.com/pub/ "Width=" height= "shockwave/cabs/flash/swflash.cab#version=6,0,29,0" > <param name= "movie" value= "/bbs.swf" > <param name= "wmode" value= "Opaque" > <param name= "Quality" value= "High" > <embed src= "/images/head/bbs.swf" quality= "High" "Http://www.macromedia.com/go/getflashplayer" type= "Application/x-shockwave-flash" width= "pluginspage=" height = "Wmode=" "Opaque" ></embed> </object> </button> </a> |
2, Flash software to realize the Flash link
In the process of making flash, if you want to realize click to jump to the designated URL, just select the component, right-action, add Geturl method can be. However, this method is not controllable, if you need to change the link, you will need to change the flash code and regenerate flash. This approach is often used in situations where Flash links are not easy to change.
On (release) [Get URL ("write the address you want to link here")]
Cases
The code is as follows |
Copy Code |
On (release) { GetURL (http://www.111cn.net, "_blank"); } |
3, JS variable implementation of the Flash link
This method of thinking is in the process of flash production, do a can get the parameters of the variable, and then jump to the variable address. This means that you can control the flash link by changing the parameters externally. This method needs to match with the original Flash script, if you get a flash without any link processing script, this way is not suitable.
Tip: The _blank parameter in the second line of the code in Method 1 can be removed or modified to _self to let the link open in the current window