Flash on the closure of ads button Discussion _ Basics

Source: Internet
Author: User
Tags closure visibility
On both sides of the page is a symmetrical couplet flash advertising is very common, today we do not talk about how to make couplet ads, mainly about flash ads in the small "x" (Turn off the button) code, as well as its interface with the external Web environment. This turn off twist is also a bit of a learning.

The concrete steps are as follows: Draw a small "x" to close the twist of the graphic, this should not be difficult? When all selected, press the F8 key to convert to a "button" component, click to select this small button, press the F9 key to open the action panel, add the following code:

The following is the program code:
On (release)
{
GetURL ("Fscommand:", "");
}

Is it that simple? Yes, in Flash is so simple, of course, to do the following work in the Web page. Here we use some javascript stuff to do a good couplet for our code block transplant. All the code is as follows:
The following is the program code:
<!--couplet start-->
<script language=javascript Event=fscommand () for=dl>
duilian2.style.visibility= ' hidden ';
duilian3.style.visibility= ' hidden ';
</SCRIPT>

<script language=javascript>
function Winload ()
{
duilian2.style.top=20;
duilian2.style.left=5;
duilian3.style.top=20;
duilian3.style.right=5;
}
if (document.body.offsetwidth>800) {
{
document.write ("<div id=duilian2 style= ' position:absolute;visibility:visible;z-index:1 ' ><EMBED ') images/banner.swf ' Quality=high width=100 height=300 type= ' Application/x-shockwave-flash ' id=dl></EMBED> </div> "
+ "<div id=duilian3 style= ' position:absolute;visibility:visible;z-index:1 ' ><embed src= '/images/banner.swf" ' Quality=high width=100 height=300 type= ' application/x-shockwave-flash ' id=dl></embed></div> ');
}
Winload ()
//}
</SCRIPT>
The end--> of <!--couplet


The entire section contains two blocks of JS code, from the first look to see is set when the events in Flash Fscommand () duilian2 and duilian3 visibility (visible) property is hidden (hidden). And the second paragraph JS is inserted couplet ads and set up the couplet in the browser window where the position appears. {}

Insert the top piece of code into any page, and then copy the flash to the same directory as the page, and you can see it. Do you feel like you've learned a trick?

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.