3752 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Located in Spain
  • Has sold $125,000+ on Envato Market
  • Helped several times protecting Envato Market against copyright violations
+9 more
pezflash says

Hi all.

This should be only readed by authors, but as the multiple request for an authors private forum seems to fall in the forgotten (Envato: it’s really so so difficult??) i post it here.

As many authors finally use external previews on their own servers (to add a bonus preview or use php/mysql services, for example) i think we should protect that previews. Obviously we can’t avoid thieves trying to hack them, but at least we can avoid people using directly the swfs.

The idea is using the externalInterface class to run the file only in the owner server address. This is transparent and you skip filling a good preview of watermarks and so. This is the code (as2):

import flash.external.*;
urlPath = ExternalInterface.call("eval","document.location.href");
if (urlPath !== "http://www.author_domain/project_folder_example") {
    _root._visible = false;
}

Hope this will be useful for someone here.

<”}}><

3256 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+9 more
ParkerAndKent says

Hi,

you don’t need the external interface to do that, it’s enough to use the local connection class to get the domain where the swf is running. In any case this method (domain lock) is the most used already.

Good suggestion btw…

Parker

1664 posts
  • Has referred 50+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Won a Most Wanted contest
+9 more
flashedge says
I use this one, posted a while ago.
function isStolen():Boolean 
        {
          var _domain : String = (new LocalConnection()).domain;
          var _allowedDomainList : Array = new Array();

          _allowedDomainList.push("flashedge");
          _allowedDomainList.push("flashden");
          _allowedDomainList.push("activeden");
          _allowedDomainList.push("envato");
          _allowedDomainList.push("localhost");    //add localhost and 127.0.0.1 to be able to run locally
          _allowedDomainList.push("127.0.0.1");

          for(var i : Number = 0; i < _allowedDomainList.length; i++)
            if (_domain.toLowerCase().indexOf(_allowedDomainList[i].toString().toLowerCase()) > -1) return false;
          return true;
        }
4140 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Located in Brazil
+3 more
tsafi says
I use this one, posted a while ago.

I remember the day AD change there host, so many files didn’t work and so many update was needed by us .

Best way just do your own encrypted and test it, some encrypted software can encrypted even url links verb` atc` .

1699 posts Building the Web.
  • Has been a beta tester for an Envato feature
  • Sells items exclusively on Envato Market
  • Has sold $250,000+ on Envato Market
  • Had an item featured on Envato Market
+8 more
ZoomIt says
I use this one, posted a while ago.
function isStolen():Boolean 
        {
          var _domain : String = (new LocalConnection()).domain;
          var _allowedDomainList : Array = new Array();

          _allowedDomainList.push("flashedge");
          _allowedDomainList.push("flashden");
          _allowedDomainList.push("activeden");
          _allowedDomainList.push("envato");
          _allowedDomainList.push("localhost");    //add localhost and 127.0.0.1 to be able to run locally
          _allowedDomainList.push("127.0.0.1");

          for(var i : Number = 0; i < _allowedDomainList.length; i++)
            if (_domain.toLowerCase().indexOf(_allowedDomainList[i].toString().toLowerCase()) > -1) return false;
          return true;
        }

you just have to call that function from a constructor function ?
great suggestion

2671 posts
  • Has been part of the Envato Community for over 7 years
  • Has referred 100+ members
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Has collected 50+ items on Envato Market
+5 more
Chuckanucka says

It would be awesome if AD handled this themselves somehow. Can’t be that hard to implement.

1664 posts
  • Has referred 50+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Won a Most Wanted contest
+9 more
flashedge says
you just have to call that function from a constructor function ?
great suggestion
Yup, just call it. Like this:
if (isStolen) { trace ("This file has been stolen!");} else { runYourStuff(); }
1699 posts Building the Web.
  • Has been a beta tester for an Envato feature
  • Sells items exclusively on Envato Market
  • Has sold $250,000+ on Envato Market
  • Had an item featured on Envato Market
+8 more
ZoomIt says
you just have to call that function from a constructor function ?
great suggestion
Yup, just call it. Like this:
if (isStolen) { trace ("This file has been stolen!");} else { runYourStuff(); }

very cool, thanks

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by