Add a hyperlink to Flash (transparent layer is recommended) to be compatible with mainstream browsers

Source: Internet
Author: User

Today, I want to add a hyperlink to a Flash on the star candle network. I just wanted to directly set a hyperlink outside the object. After trying it, I found that this was not the case. I asked Baidu for help and solved the problem, the record is as follows:

Cause:Flash is the highest level by default. Therefore, I often encounter a situation where Flash blocks the drop-down menu and overwrites other elements.

Solution:

Step 1: perform the following steps:
1. Put the Flash file in a layer, set it to the bottom layer, and set FLASH to transparent.
Copy codeThe Code is as follows:
<Div class = "ad_top" style = "text-align: center;">
<Object classid = "clsid: d27cdb6e-ae6d-11cf-96b8-444553540000"
Codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
Width = "948" height = "93" id = "flashlogo">
<Param name = "movie" value = ".../templets/content/images/slogan.swf">
<Param name = "quality" value = high>
<Embed src = ".../templets/content/images/slogan.swf" quality = high width = "948" height = "93" name = "flashlogo"
Type = "application/x-shockwave-flash" pluginspage = "http://www.macromedia.com/go/getflashplayer">
</Embed>
<STRONG> <SPAN style = "COLOR: # cc0000"> <param name = "wmode" value = "transparent"/> </SPAN> </STRONG>
</Object> </div>

2. add another layer to the FLASH layer. Flash itself cannot directly add events such as onclick.. Therefore, you can only add a transparent layer to FLASH with the help of other things:
Copy codeThe Code is as follows:
<Div id = "huiLayer" style = "cursor: hand; position: absolute; top: 142px; width: 948px; height: 93px; z-index: 1; visibility: visible; text-align: center; "> <a href =" http://www.xzrj.net "target =" _ blank "> </a> </div>

Note:Transpandemo.gif is transparent, otherwise it will cover the bottom Flash;
3. the IE browser can do the above step. Firefox also needs the following step.
Add
Copy codeThe Code is as follows:
Wmode = "transparent"

The complete code is as follows:
Copy codeThe Code is as follows:
<Div class = "ad_top" style = "text-align: center;">
<Object classid = "clsid: d27cdb6e-ae6d-11cf-96b8-444553540000" codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width = "948" height = "93" id = "flashlogo">
<Param name = "movie" value = ".../templets/content/images/slogan.swf"> <param name = "quality" value = high>
<Embed src = ".. /.. /templets/content/images/slogan.swf "quality = high width =" 948 "height =" 93 "name =" flashlogo "type =" application/x-shockwave-flash "pluginspage = "http://www.macromedia.com/go/getflashplayer" wmode = "transparent"> </embed>
<Param name = "wmode" value = "transparent"/>
</Object>
</Div>
<Div id = "huiLayer" style = "cursor: hand; position: absolute; top: 142px; width: 948px; height: 93px; z-index: 1; visibility: visible; text-align: center; "> <a href =" http://www.xzrj.net "target =" _ blank "> </a> </div>

Solution 2: I did not try it online, as shown below:
In Flash, external scripts are called through FSCommand. The method is simple, practical, and controllable. For specific usage, search for the FSCommand key on the Internet.

Related Article

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.