Cannot get score api to work

houranghourang povedal

veľmi dávno | Príspevok #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 povedal

veľmi dávno | Príspevok #2
Remember to include Nonoba.api.NonobaAPI in the same frame.

houranghourang povedal

veľmi dávno | Príspevok #3 | odpoveď na #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 povedal

veľmi dávno | Príspevok #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 povedal

veľmi dávno | Príspevok #5
not usually with as2. and i do a lot of class stuff.

but thanks that works great :)

ChrisChris povedal

veľmi dávno | Príspevok #6
My pleasure :)

Odpoveď na diskusiu

Zaregistruj sa a zapoj sa do diskusie

Flashky.sk

flashky.sk je herný portál kde môžeš hraj single- aj multiplayerové flashové hry.

Nástroje pre vývojárov

Ak si vývojár flash hier tak pre teba máme skvelé nástroje, ktoré ti pomôžu robiť ešte lepšie hry.

Skvelé hry

Vyskúšaj niektoré z najlepších online flash hier, ktoré tu máme! Samozrejme zadarmo

Copyright ©2007-2012 Flashky.sk™ - All rights reserved.31.2001ms on SERVER34096