How to close the banner in the Web page

Source: Internet
Author: User
Tags add exit exit in implement visibility
Advertising | Web page

Add the Closed button in the Flash banner as long as you add the Quit Exit command to the button.

On (release) {
Fscommand ("Quit");
}

Flash Player can now be turned off by clicking Exit in Flash Player, but it cannot be exited in the Web page. It is not possible to implement an exit directly in a Web page, but we can use the layer's hidden properties to implement it. The method of inserting the layer is not much to say here, look at the following code.

<div id= ' right ' style= ' position:absolute; Visibility:z-index; left:679px; top:14px; ' >
<embed src= ' http://www.webjx.com/htmldata/2005-09-28/100250.swf ' quality=high pluginspage= 'http:// Www.macromedia.com/go/getflashplayer"type=" Application/x-shockwave-flash "width=" height= "" id= ' ad ' Wmode=opaque></embed>
</div>

<script for= ' ad ' event= ' Fscommand () ' language= ' JavaScript ' >
right.style.visibility= ' hidden ';
The visible in the Style property with ID right is hidden, hidden change to visible to display
</script>

Here are the following points to note:

First, the ID in the div to name, the example code in the right for the layer ID name, that is, id= ' right '

Second, to the SWF file ID name, the example code with ad for the SWF in the Embed ID name, that is, id= ' ad '; and don't forget wmode=opaque.

The value of the for after the script is the ID name in the EMBED element in which the SWF resides, and the event events are the Fscommand () command in the SWF file.

If there are multiple similar ads, you can add layers to insert the corresponding ad file, but the ID name of the EMBED element to be the same, the DIV element ID name can be different. If the ID name of the DIV element is different, the right at the script is changed to the corresponding DIV element ID name.



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.