Restrict the playback of flash in the specified domain name/URL (flash anti-leech)

Source: Internet
Author: User
Restrict flash playback (flash anti-leech) on the specified domain name/website. [Collection correction]

 

 

This method was found during the test today, limiting the playback of flash in the specified domain name. Maybe this method is a little old, but it still has some effect to prevent the attack. I tried to force the task to end.

Url = "http://www.zhugao.cn ";

/*
The following judges the first 20 characters of the URL (the number of characters is modified based on your url). If it is different from the URL, the playback fails. Note: SwF can be placed in any directory, as long as the first 20 characters of the URL are correct.
*/

If (_ URL. substring (0, 20) <> URL ){
Gotoandstop (2 );

/*
Here, you can do something, for example, set "Local playback Security" in the release settings to "only access the network", and then create numerous pop-up windows here.
Onenterframe = function (){
Geturl ("http://www.zhugao.cn", "_ blank ");
}
*/

} Else {
Gotoandplay (3); // jump to normal playback
}

For ease of reading, the following are not annotatedCode:
Url = "http://www.zhugao.cn ";
If (_ URL. substring (0, 20) <> URL ){
Gotoandstop (2 );
} Else {
Gotoandplay (3 );
}

To allow multiple domain names, write as follows:
Url = "http://www.zhugao.cn ";
Url2 = "http://zhugao.cn ";
If (_ URL. substring (0, 20) = URL) | (_ URL. substring (0, 16) = url2 )){
Gotoandplay (3 );
} Else {
Gotoandstop (2 );
}

Note: Tips for exporting data during design using this method:
Use IE to open the specified target URL first to avoid frequent pop-up windows during export. If it is invalid, set the default browser to IE and close the player window during export to continue editing. Note, flash software may be forcibly terminated due to an error. Please save the document before exporting. Remember!

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.