Trying to get the AS2 API working.

hansahansa dijo

hace mucho tiempo | Publicación #1
Okay so first how is the files suposed to be localated?
I first tried to put the NonobaAPI.as in the same place as my .fla but that gave the the following error

*Error* C:\Documents and Settings\Mats\My Documents\johannes\NonobaAPI.as: Line 8: The class 'Nonoba.api.NonobaAPI' needs to be defined in a file whose relative path is 'Nonoba\api\NonobaAPI.as'.
class Nonoba.api.NonobaAPI{

so I moved it to Nonoba\api\ (with Nonoba in the same place as my .fla) is this the right place?

Second I try to get the highscores working using this code that is suplied in Documention (game.score is my score variable)

NonobaAPI.SubmitScore("highscore", game.score, 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;
}
}
})

I then uploaded my game here as "in development" but no highscore shows up what shall I do?

404404 dijo

hace mucho tiempo | Publicación #2
Nonoba\api\NonobaAPI.as is where you want it. Sounds like that's where it's at though.

As for your code, I'm too lazy to look through it right now, but I will provide the code that I used for Slipstream.



It's been a while since I've worked with the API, so this is off of memory, but I'm pretty sure it's very important that your "SubmitScore" be in the same frame/level as your "result_callback" function and your "import Nonoba.api.NonobaAPI"

Hope this helps.
Última edición hace mucho tiempo

hansahansa dijo

hace mucho tiempo | Publicación #3
Thanks 404, I forgot to import the api :P

Well highscores works now so I'll try to get achievements working :D
Última edición hace mucho tiempo

hansahansa dijo

hace mucho tiempo | Publicación #4
Okay everything works now :D http://nonoba.com/hansa/pi-r-action

How long does it take for my achivments to be approved?

EDIT: They work now so I guess it don't take that much time :D
Última edición hace mucho tiempo

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