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.
Trying to get the AS2 API working.
404 dijo
hace mucho tiempo | Publicación #2 Última edición hace mucho tiempo
hansa 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
Well highscores works now so I'll try to get achievements working :D
Última edición hace mucho tiempo
hansa 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
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
hansa dijo
hace mucho tiempo | Publicación #1I 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?