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.