SHARE
Facebook X Pinterest WhatsApp

Web Developer Tutorial: How to Protect SWF files From a Decompiler

Mar 16, 2010

Flash SWF files contain your important Intellectual Property, but once they are on the web, anyone can download your SWF file and decompile it with a Flash decompiler tool. This tutorial will show you how to protect your SWF files from decompilers using SWFProtection.

What You Need


SWFProtection: The software comes with a free trial, so you can check it out before you buy it. You may download the trial version

here

.



SWFProtection stops all Flash decompilers, thus helps you protect your valuable design and intellectual properties from being stolen. The program uses a new feature of Flash 9 and Actionscript 3. It converts your SWF file to binary data, then encrypts the data and embeds it into a new SWF file. In this way, all content in the SWF file, including Actionscripts, images, sounds and animations, will be protected. The program enhances the encryption further with Actionscript obfuscation.


The built-in domain locking feature can disable viewing of the SWF file from local computers and only allow SWF files being hosted on specified domains to be viewed, so the SWF file will only work on your own website. If they are downloaded, they will refuse to play and display a warning message or just render as useless.

Step 1 in the Protection Process


Download and install SWFProtection. Launch the software, click the button

Add File

, browse the SWF files which need protection and add them to the file list.

Step 2


Click the

Domain Lock

tab, check the options

Disable viewing SWF files from local hard disk

and

Only allow SWF files hosted on domains

, then click button

Add

, and enter your website

s domain name. If you want to display a warning message when someone tries to view your SWF file on a local computer or when they upload it to their website, you can check the option

When domain is incorrect

-

>

Display message

, then enter the HTML formatted text in the input box. Hyperlinks are supported in the warning text.

Step 3


Click the

Output

tab, define how to rename and where to save the protected SWF files.

Step 4


Click the button

Protect

. Congratulations! You have successfully protected the SWF files. In a typical Flash decompiler, the protected SWF file will look as shown below.

The following Flash SWF file is protected with SWFProtection–you may download and test it out yourself (right mouse click on the link, choose Save As).

Recommended for you...

Shopify Alternatives
Helpful Tips for Designing a Landing Page that Converts
Five Essential HTML5 Editors
Best Web Hosting Providers
Enrique Corrales
May 31, 2022
HTML Goodies Logo

The original home of HTML tutorials. HTMLGoodies is a website dedicated to publishing tutorials that cover every aspect of being a web developer. We cover programming and web development tutorials on languages and technologies such as HTML, JavaScript, and CSS. In addition, our articles cover web frameworks like Angular and React.JS, as well as popular Content Management Systems (CMS) that include WordPress, Drupal, and Joomla. Website development platforms like Shopify, Squarespace, and Wix are also featured. Topics related to solid web design and Internet Marketing also find a home on HTMLGoodies, as we discuss UX/UI Design, Search Engine Optimization (SEO), and web dev best practices.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.