How to implement a sitelock?

37 views
Skip to first unread message

omega...@gmail.com

unread,
Feb 27, 2015, 10:49:32 AM2/27/15
to fla...@googlegroups.com
I'd like to sitelock my Flambe (Flash) game, so not everyone can just grab the SWF and put it on their own site. It builds as a single SWF with embedded assets (thanks to purplepwny's Flambe 4 fork), so otherwise it would be very easy for anyone to just rip the SWF and rehost it.

I don't imagine this should be *too* hard to implement, given that a sitelock is just checking the page URL against a whitelist. Assuming it is possible to check the page URL from inside Flambe.

Bruno Garcia

unread,
Feb 27, 2015, 11:37:35 AM2/27/15
to fla...@googlegroups.com
The same APIs available to AS3 are also available to Haxe/Flambe:

#if flash
if (flash.Lib.current.stage.loaderInfo.url != "http://yoursite.com")) {
    trace("This site isn't allowed!");
}
#end

(Code sample is untested, but you get the idea)


On Fri, Feb 27, 2015 at 10:49 AM, omega...@gmail.com wrote:
I'd like to sitelock my Flambe (Flash) game, so not everyone can just grab the SWF and put it on their own site. It builds as a single SWF with embedded assets (thanks to purplepwny's Flambe 4 fork), so otherwise it would be very easy for anyone to just rip the SWF and rehost it. I don't imagine this should be *too* hard to implement, given that a sitelock is just checking the page URL against a whitelist. Assuming it is possible to check the page URL from inside Flambe.
--
You received this message because you are subscribed to the Google Groups "Flambe" group. To unsubscribe from this group and stop receiving emails from it, send an email to flambe+un...@googlegroups.com. To post to this group, send email to fla...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/flambe/ad693469-24a4-444d-8ac1-3a2a1e4bcee0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

omega...@gmail.com

unread,
Feb 27, 2015, 11:43:33 AM2/27/15
to fla...@googlegroups.com, b...@aduros.com
Heh, should've thought to just look up the Flash way of doing it.. Thanks.
Reply all
Reply to author
Forward
0 new messages