How to add a link to flash

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.