3757 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Located in Spain
  • Has sold $125,000+ on Envato Market
  • Made it to the Authors' Hall of Fame
+11 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
  • Became a Top 20 Author of the Month
+11 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

1665 posts
  • Had an item that was trending
  • Had an item that became a weekly top seller
  • Won a competition
  • Made it to the Authors' Hall of Fame
+10 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 7 years
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Located in Brazil
+5 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` .

1744 posts Building the Web.
  • Became a Top 20 Author of the Month
  • Had an item that was trending
  • Had an item that became a weekly top seller
  • Has been a beta tester for an Envato feature
+10 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 8 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
+7 more
Chuckanucka
says

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

1665 posts
  • Had an item that was trending
  • Had an item that became a weekly top seller
  • Won a competition
  • Made it to the Authors' Hall of Fame
+10 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(); }
1744 posts Building the Web.
  • Became a Top 20 Author of the Month
  • Had an item that was trending
  • Had an item that became a weekly top seller
  • Has been a beta tester for an Envato feature
+10 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

by
by
by
by
by
by