A Flash Developer Resource Site














Internet Commerce

Partners & Affiliates














Developer Channel

internet.com


Featured Flash FLA
Gallery Downloads 11337 Flash Movies | 1 New Flash Movies Added
What's New | Top 100

Featured FLA

» Author: Bugra Ozden
» Title: Skatalog v9 - product catalog
» Description: Create your product catalog easly and publish on your website or Create your image gallery, documents list, portfolio. Fully XML Driven
» More by Bugra Ozden


Random FLAs | Add Flash Movie
Featured Flash Site
Gallery Downloads 5828 Flash Sites | 0 New Flash Links
What's New | Top 100 Flash Site

Featured Site

» Posted in the Flash Kit Links section
» Title: Creative DW Image Show PRO
» Description: Creative DW Image Show PRO is a Dreamweaver extension which enables the user to create multimedia presentations. It combines the features of the popular Creative DW Image Show with the ability to add professional text effects to slides (similar to After Effects). The product is very customizable: the user can choose the duration of the transition effects, the slide motion start and end position, zoom and panning type for both images and texts.


Random Links | Add your own Flash Related Links
Flash Tutorials 1280 Tutorials 7 New Tutorials Added!
What's New | Top100

» Make a Flash Slide Show Screen Saver
» Simple flash making tutorial for thanksgiving
» Create flash banner for website
» Create xml slideshow with free template
» How to Insert a Multilingual Subtitle Into Your Flash Video Studio
» How to Create Cool Halloween Slideshow
» Debugging flash using the Firebug console
» Create Flash Slideshow on Blogger
» FLASH TRICKS IN WEB ADVERTISING: FLASH BANNERS
» Unknown Tag: Title10
Random Tutorial | Add Site

Sr Instructional Designer D2L-Moodle,Clearance
WSI Nationwide, Inc.
US-NJ-Fort Monmouth

Justtechjobs.com Post A Job | Post A Resume


Tutorials Home What's New Top Rated Submit myTutes Random!

Search Tutorials


Tutorials Tutorials » Actionscripting/Basic

Categories Easy to Implement Copy Protection
Author: Tiran Dagan | Website: http://www.TiranDagan.com |

 
Page 1
1 2 next»

Introduction

Sometimes it is enough for me to see a SWF to understand how to do something I was grinding my teeth on for quite a while. If you have sufficient experience, just the title and subtitle give away my little trick !

The problem

This was addressed by cathode in an article about the subject of protecting your work, on Flashkit. I would like to show you how easy it is to protect your work from being shared and moved around, uncontrollably on the internet. This especially pertains to those of us who publish cool SWF in order to demonstrate our work, and don't wish others presenting the SWF as their own. Sometimes, placing your name or copyright information to the artwork itself is too tacky. Here's how you can make certain that your SWF is only displayed on the target site(s) of your choosing:

CHECK THE SOURCE URL!

protocol=_url.substr(0,_url.indexOf(":"));
if (protocol=="file") {
 // Let's be nice:
 // If the leecher downloaded the SWF, well let them play it
 // on their on computer
 //
 message="It seems you are trying out this SWF on your local hard disk. That's ok, but be aware that this SWF will only work if played on the source site"
} else if (protocol=="http")  {
 // doubleSlash
 // ===========
 //	The location of the first occurance of a "//" in the url.
 //  url's are formed as following:
 //
 // [protocol]://[server]/[pathname]
 //
 // Where protocol is any udp such as ftp, file, http, etc
 //
 doubleSlash=_url.indexOf("//");
 //
 // server
 // ======
 // Isolate the server name: Go past the "//", and everything
 // between the doubleslash and the next "/" (single slash")
 // is a server name
 server=_url.substr(doubleSlash+2,_url.indexOf("/",doubleSlash+2)-doubleSlash-2);
 //
 // Let's get rid of the "www" prefix, because
 // sometimes servers recognize the address without this
 // prefix.
 // Here's a little catch!
 // What if the user typed "http://www.6FootMedia.com"
 // That is not the same as "http://www.6footmedia.com"
 // (The difference is in the caps)
 server=server.toUpperCase()
 //
 // Get rid of the WWW. prefix
 // so we can focus on examining only the server domain name
 if (server.indexOf("WWW.") <>-1) server=server.substr(server.indexOf("WWW.")+4,server.length);
 //
 if (server.indexOf ("TIRANDAGAN.COM") <> -1 or server.indexOf("FLASHKIT.COM") <> -1) {
 message = "Copyrights are being preserved";
 } else {
 message = "Alert! This film's copyrights are being infringed! A message is being sent to author that you have copied his work. Expect the copyright police to arrive 15 minutes at your doorsteps. \nOffending website path: " + _url;
 // Here you can put code to redirect the film to another frame
 // or to getURL to a page on your site that reports a stolen goods page...
 }
}
box1=prefix;

Fig.1 – The code in Frame 1 of the FLA

Most of this code is well documented so just look at the code. The idea here is that the _url property of Flash 5 contains the calling url, which includes the server name on which the SWF is sitting. Unless someone comes up with masking the server name, the SWF will only play on particular servers. I suggest you try a subtle approach in your copyright protection, so as to not give away the simplistic mechanism of your protection: Simply transfer the film to an empty frame with a stop(); command so the user (the thief) does not understand what is keeping the film from loading.

1 2 next»

» Level Intermediate

Added: : 2001-10-23
Rating: 9.02 Votes: 75
Hits: 6751
» Author
At the age of 14, Tiran got his first "gig" as a programmer for a film production company. Since then, he has managed large development teams on PC, VAX and Unix. His roots are in the Z80, 8086 and Apple Green Book of operating system mnemonics, but Tiran incorporates his extensive background in art, music and general knowledge into object-oriented programming. His work combines video, audio, animations and server side programming.
» Download
Download the files used in this tutorial.
Download (103 kb)
Get conversion and unzipping tools for PC and Mac here!

» Forums
More help? Search our boards for quick answers!

Please rate this tutorial, 10 is the top rating, you can also click the comments link to read/write a review.
10 9 8 7 6 5 4 3 2 1
Read or Post Comments
 
   
 

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs