Nonoba URL specific code

gws34gws34 dijo

hace mucho tiempo | Publicación #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 dijo

hace mucho tiempo | Publicación #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 dijo

hace mucho tiempo | Publicación #3
Yes that's a nice way to do it, thanks.

Contestar al tema

Regístrate ahora para responder a éste tema

Juegamigo

juegamigo.com es un sitio de juegos independiente donde puedes jugar solo o en conjunto en los juegos multijugador de una manera gratuita.

Herramientas para Desarrolladores

Si eres un desarrollador de juegos flash, tenemos unas increíbles herramientas que te ayudarán a hacer aún mejores tus juegos.

Juegos Padrísimos

¿Por qué no jugar algunos de los mejores juegos flash en línea que tenemos?, ¡es completamente gratis!

Copyright ©2007-2012 Juegamigo™ - All rights reserved.31.2ms on SERVER34096