Add a hyperlink to Flash (recommended transparent layer) compatible with mainstream browser _javascript tips

Source: Internet
Author: User
Today to the star candle online a flash plus a hyperlink, I would like to directly outside the object directly set a hyperlink can, after trying to find that it is not so, help Baidu, problem solving, records are as follows:

Reason:Flash defaults to the highest level. So, I often meet flash the drop down menu blocking the situation, and other original element cover out.

Solution:

The first: The steps are as follows
1. Put the flash file in a layer, set to the bottom, flash set to transparent.
Copy Code code 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= "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=" 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. In the flash layer, plus a layer, flash itself can not directly add onclick. And so on, so, can only use other things. Just add a transparent layer to the flash:
Copy Code code 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>

Description:Transpanrent.gif if transparent, otherwise will be to the bottom of the flash cover;
3. IE browser to the above step on it, Firefox also need the following step
Add in the embed.
Copy Code code as follows:

Wmode= "Transparent"

The complete code is as follows:
Copy Code code 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=" "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=" "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>

The second option, the online search did not try, as follows:
is in flash internal through the Fscommand call external script, the method is simple and practical, controllable ability, concrete usage, please search the Fscommand key word on the net

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.