Nonoba URL specific code

gws34gws34 said

a long time ago | Post #1
Something that gave me a headache and others might like to know: I wanted my game only to submit the Nonoba highscores/achievements if being played on Nonoba. But, doing a stringent url check on "nonoba.com" does not work, e.g.

var allowed_site:String = "nonoba.com";
var domain = this.root.loaderInfo.url.split("/")[2];
if (domain.indexOf(allowed_site) == (domain.length - allowed_site.length)) {
onNonoba= true;
}

The flash files are actually served from "amazonaws.com", so you have to use that in any url checks of this type...

ChrisChris said

a long time ago | Post #2
Quite simple, do a request to GetUsername, if you get an error state in the callback (Oppose to not logged in or success) the game is not being played on Nonoba or using the Nonoba wrapper.

Additionally this will not make any outbound requests or anything as the system enters the error state much before that.

gws34gws34 said

a long time ago | Post #3
Yes that's a nice way to do it, thanks.

Reply to thread

Sign up now to reply to threads

Funkyball

funkyball.com is an independent gaming site where you can play both single- and multiplayer games for free.

Developer Tools

If you're a flash game developer, we've got some awesome tools to help you make even better games.

Great Games

Why not try some of the very best online flash games we've got, completely free?

Copyright ©2007-2012 Funkyball™ - All rights reserved.42.0024ms on SERVER34097