Cannot get score api to work

houranghourang dijo

hace mucho tiempo | Publicación #1
Im new here and im trying to add the score api to my game. for some reason it is not working. i have done this on many other websites without issues. It seems to me like its not even trying to call the function SubmitScore as i get no response whatsoever. here is my code:

NonobaAPI.SubmitScore("totalscore", _global.totalscore, function(response:String){
switch(response){
case NonobaAPI.SUCCESS:{
trace("The score was submitted successfully")
break;
}
case NonobaAPI.NOT_LOGGED_IN:{
trace("The user is not logged in")
break;
}
case NonobaAPI.ERROR:{
trace("An error occurred.")
break;
}
}
});

ChrisChris dijo

hace mucho tiempo | Publicación #2
Remember to include Nonoba.api.NonobaAPI in the same frame.

houranghourang dijo

hace mucho tiempo | Publicación #3 | en respuesta a #2
ok where in the documentation does it say to do that? and what is the exact code to put in? i appreciate your help :)

ChrisChris dijo

hace mucho tiempo | Publicación #4
Well in general you need to include the code you are to use :)

import Nonoba.api.NonobaAPI;

At the top of your keyframe should do the trick.
Make sure that the Nonoba folder is located in the same folder as your fla file.

houranghourang dijo

hace mucho tiempo | Publicación #5
not usually with as2. and i do a lot of class stuff.

but thanks that works great :)

ChrisChris dijo

hace mucho tiempo | Publicación #6
My pleasure :)

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.2001ms on SERVER34096