How to disable an advertisement bar on a webpage

Source: Internet
Author: User
Tags exit in

To add the close button to the Flash ad bar, you only need to add the quit exit command to the button.
On (release ){
Fscommand ("quit ");
}
Now, click exit in Flash Player to disable flash player, but you cannot exit on the webpage. It is impossible to exit directly on a webpage, but we can use the hidden attribute of the layer to implement it. The specific insert layer method is not described here. Let's take a look at the followingCodeRight.

<Div id = 'right' style = 'position: absolute; visibility: Z-index; left: 679px; top: 14px; '>
<Embed src0000'100250.swf 'Quality = high pluginspage = "http://www.macromedia.com/go/getflashplayer" type = "application/X-Shockwave-flash" width = "100" Height = "300" id = 'ad' wmode = opaque> </embed>
</Div>

<Script for = 'ad' event = 'fscommand () 'Language = 'javascript'>
Right. style. Visibility = 'ddd ';
// Hide the visible property in the style property with the ID of right. Change hidden to visible to display the property.
</SCRIPT>

Note the following points:
1. Name the ID in the Div. In the code above, right is used as the layer ID, that is, id = 'right'
2. Rename the SWF File ID. In the code above, use ad as the ID of SwF In the embed, that is, id = 'ad'. Do not forget wmode = opaque.
3. The for value after script is the ID of the EMBED element in which SWF is located, and the event is the fscommand () command in the SWF file.

If there are multiple similar advertisements, you can add a layer to insert the corresponding advertisement file. However, the ID of the EMBED element must be the same, and the ID of the DIV element can be different. If the ID of the DIV element is different, the right of the script must be changed to the ID of the corresponding Div element.

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.