Protecting your Shockwave from Pirates
August 6, 1998
by Alex Zavatone
Sometimes, the topic of "how can I stop somone from stealing my shockwave" comes up. This is not a rampant problem but I have heard reports of certain "are you sure you're over 18" web sites pirating shockwave games from legitimate game sites. In any case, what can you do to prevent shockwave pirates? Well, there are two levels of security that can be placed in your shockwave. The first relies on where the shockwave is being served from, ie your domain. You can add a handler or object to your shockwave startup routines that will check to see if the domain is an approved domain or url. If it is not, then post an alert and either stop or quit the browser. For your convienence, a simple handler and an object to do this are included at the end of the article.
The second method to protect your shockwave is a bit more complex and probably overkill for most projects but it does get by the one problem not solved by the previous method -- someone else's web page could still link to your shockwave on your site. This method requires the passing of an unlock key through any of the embed variables to the shockwave movie itself. The unlock variable would be intercepted and decoded in the shockwave based on a simple algorithm. The caveat here is that the HTML page on the server would have to be regenerated every day through a server side script. This is much more complicated but to date, we haven't been able to find any holes in this plan. And if you need it, it should do the trick for you.
On ValidateHostDomain domains, action, message set successFlag = 0 repeat with myDomain in domains if the moviepath contains myDomain then set successFlag = 1 return end if end repeat -- if we get here, there are no valid domains -- but we'll check anyway if not successFlag then alert message do action end if endExamples:
-- ValidateHostDomain ["director-online.com", ¬ "indymusic.com"], "quit", "don't pirate my shockwave" -- set myDomains = ["director-online.com",¬ "indymusic.com"] -- set myAction = "quit" -- set myMessage = "don't pirate my shockwave" -- ValidateHostDomain myDomains, myAction, myMessage
parent script name: ValidateHostDomain on new me, domains, action, message set successFlag = 0 repeat with myDomain in domains if the moviepath contains myDomain then set successFlag = 1 return end if end repeat -- if we get here, there are no valid domains -- but we'll check anyway if not successFlag then alert message do action end if endExamples:
-- ValidateHostDomain ["director-online.com", ¬ "indymusic.com"], "quit", "don't pirate my shockwave" -- set myDomains = ["director-online.com",¬ "indymusic.com"] -- set myAction = "quit" -- set myMessage = "don't pirate my shockwave" -- new (script "ValidateHostDomain", myDomains,¬ myAction, myMessage)
Copyright 1997-2024, Director Online. Article content copyright by respective authors.