[Kongregate API] High Scores page 8 (locked)

Subscribe to [Kongregate API] High Scores 194 posts, 102 voices

Sign in to reply


 
avatar for nerd2005 nerd2005 2 posts
Flag Post

now that answers my question, so you can work in Flash Player 6 but it is much better in flash player 7. thanks #.#

 
avatar for Heylon Heylon 137 posts
Flag Post

by the way i am having troubles getting the kongregate API running on my game(all my other games work with kong API).
its only this one game. The API for all my other games seems to work fine.
problem: when i submit my game, go though the process of uploading, my game hasent got an achivements tab.no API
Any Help Please! thanks in advance.

 
avatar for djice555 djice555 3 posts
Flag Post

hi im working in as3
wat am i doing wrong
the ghost serv er works but the site won’t do it
heres what i have so far
package { import flash.display.MovieClip import flash.ui.Mouse import flash.events.* import flash.events.ProgressEvent import flash.display.SimpleButton import com.kongregate.as3.client.KongregateAPI public class DocumentClass extends MovieClip { public var playScreen:ShapeFrogger; public var gameOver:GameOver; public var niceOne:NiceOne; public var i:Number=1 public var menuScreen:MenuScreen public var kongregate:KongregateAPI public var upgradeScreen2:upgradeScreen public var frogSpeed:Number public var nEL:notEnoughLvls public var carSpeed:Number public var upgradePressed:Boolean public function DocumentClass() { upgradePressed=false carSpeed=0 frogSpeed=.5 kongregate = new KongregateAPI(); addChild(kongregate) menuScreen=new MenuScreen menuScreen.addEventListener(NavigationEvent.START, gameStart) menuScreen.addEventListener(NavigationEvent.COOL, Alright) menuScreen.x=0 menuScreen.y=0 addChild(menuScreen) } public function gameStart(navigationEvent:NavigationEvent):void { playScreen=new ShapeFrogger(); playScreen.addEventListener(AvatarEvent.DEAD, onAvatarDeath); playScreen.addEventListener(AvatarEvent.SAFE, onAvatarSafe); addChild(playScreen); playScreen.x=0 playScreen.y=0 playScreen.carSpeed=Math.random() * .05 playScreen.gameScore.setValue(1) stage.stageFocusRect=false removeChild(menuScreen) stage.focus=playScreen.car3 } public function onAvatarDeath(avatarEvent:AvatarEvent):void { gameOver=new GameOver(); gameOver.addEventListener(NavigationEvent.RESTART, onRequestRestart); addChild(gameOver) removeChild(playScreen) kongregate.scores.submit(i) } public function reboot() { i=1 menuScreen=new MenuScreen menuScreen.addEventListener(NavigationEvent.START, gameStart) menuScreen.addEventListener(NavigationEvent.COOL, Alright) menuScreen.x=0 menuScreen.y=0 addChild(menuScreen) removeChild (gameOver) stage.focus= menuScreen } public function NextLevel(navigationEvent:NavigationEvent):void { playScreen=new ShapeFrogger(); playScreen.addEventListener(AvatarEvent.DEAD, onAvatarDeath); playScreen.addEventListener(AvatarEvent.SAFE, onAvatarSafe); playScreen.x=0 playScreen.y=0 addChild(playScreen); playScreen.frog.speed=frogSpeed playScreen.car2.car2speed+=carSpeed playScreen.car3.car3speed+=carSpeed playScreen.car4.car4speed+=carSpeed playScreen.car5.car5speed+=carSpeed playScreen.car6.car6speed+=carSpeed playScreen.car7.car7speed+=carSpeed playScreen.car8.car8speed+=carSpeed playScreen.car9.car9speed+=carSpeed playScreen.carSpeed=Math.random() * (i / 10) playScreen.gameScore.setValue(i+1) i++ removeChild (niceOne) if (upgradePressed==true) { removeChild (upgradeScreen2) upgradePressed=false } stage.focus=playScreen } public function onRequestRestart(navigationEvent:NavigationEvent):void { reboot(); } public function onAvatarSafe(avatarEvent:AvatarEvent) { niceOne=new NiceOne() niceOne.addEventListener(NavigationEvent.NEXTLVL, NextLevel) niceOne.addEventListener(NavigationEvent.UPGRADE, upgrade) addChild (niceOne) removeChild (playScreen) } public function Alright(navigationEvent:NavigationEvent) { i=100000 playScreen=new ShapeFrogger(); playScreen.frog.speed=10 playScreen.addEventListener(AvatarEvent.DEAD, onAvatarDeath); playScreen.addEventListener(AvatarEvent.SAFE, onAvatarSafeHaHa); addChild(playScreen); playScreen.x=0 playScreen.y=0 playScreen.carSpeed=Math.random() * 0 playScreen.gameScore.setValue(-1) playScreen.gameScore.isPatPlaying=true stage.stageFocusRect=false removeChild(menuScreen) } public function onAvatarSafeHaHa(avatarEvent:AvatarEvent) { niceOne=new NiceOne() niceOne.addEventListener(NavigationEvent.NEXTLVL, SpecialNextLevel) niceOne.addEventListener(NavigationEvent.UPGRADE, upgrade) addChild (niceOne) removeChild (playScreen) } public function SpecialNextLevel(navigationEvent:NavigationEvent) { playScreen=new ShapeFrogger(); playScreen.addEventListener(AvatarEvent.DEAD, onAvatarDeath); playScreen.addEventListener(AvatarEvent.SAFE, onAvatarSafeHaHa); playScreen.x=0 playScreen.y=0 addChild(playScreen); playScreen.carSpeed=Math.random() * 0 playScreen.gameScore.setValue(-1) i++ playScreen.frog.speed=5 removeChild (niceOne) stage.focus=playScreen } public function upgrade(navigationEvent:NavigationEvent) { upgradePressed=true upgradeScreen2=new upgradeScreen() upgradeScreen2.addEventListener(NavigationEvent.NEXTLVL, NextLevel) upgradeScreen2.addEventListener(NavigationEvent.FASTER, faster) upgradeScreen2.addEventListener(NavigationEvent.SLOWER, slower) upgradeScreen2.addEventListener(NavigationEvent.PIC, pic) addChild(upgradeScreen2) } public function faster(navEvent:NavigationEvent):void { if (i>4) { frogSpeed=1 } else { nEL=new notEnoughLvls() addChild(nEL) nEL.x=0 nEL.y=0 nEL.addEventListener(MouseEvent.CLICK, onClickReturn) } } public function onClickReturn(me:MouseEvent) { removeChild(nEL) } public function slower(navEvent:NavigationEvent) { if (i>9) { carSpeed=-1 } else { nEL=new notEnoughLvls() addChild(nEL) nEL.x=0 nEL.y=0 nEL.addEventListener(MouseEvent.CLICK, onClickReturn) } } public function pic(navEvent:NavigationEvent) { nEL=new notEnoughLvls() addChild(nEL) nEL.x=0 nEL.y=0 nEL.addEventListener(MouseEvent.CLICK, onClickReturn) } } }<code>

 
avatar for Moneybags Moneybags 16 posts
Flag Post

Ok, bit of a noob question here, but im having trouble

From what i gather, the first line of the API can be placed anywhere in the program, and early is best, right?

Then the second line gets put in the same function as when the hero character dies, and “submit(1000)” would just be changed to “submit(points)” with points being the players score, correct?

So…where does that final chunk of coding go, and what parts do i sub in my own variables and such? O.o

Again, flash noob here, so if i got the first 2 parts wrong, please tell me :P And if anyone can help me with the 3rd, it would be greatly appreciated :D

 
avatar for Jabor Jabor 9714 posts
Flag Post

You don’t need to use that third example of code unless you want to display the highscore list directly in your own game.

 
avatar for Moneybags Moneybags 16 posts
Flag Post

Ahh, thanks Jabor. Just to be clear, if i dont display it in my game, itll still be displayed on the site?

 
avatar for flashmadruga flashmadruga 4 posts
Flag Post

Is there a way to check if you are connected or not ? the submit functions have a return value we can check for success ?
I’m not sure why it is not working in my last game ….
Thanks

 
avatar for Jabor Jabor 9714 posts
Flag Post

Yep Moneybags, the highscores will still be shown in the chat bar.

@flashmadruga: What code do you have at the moment?

 
avatar for Vegard20 Vegard20 188 posts
Flag Post

I want tohave a API high score for Credits found, is it right to put this action in to the action to credit frame:

_root.kongregateCredits.submit(1); // The user found the credits screen

And put: _root.kongregateServices.connect(); on the first frame?

 
avatar for djice555 djice555 3 posts
Flag Post

how do i integrate the scores in as3 if im using seperate as class files

 
avatar for Jabor Jabor 9714 posts
Flag Post

@Vegard: If you do that, you’ll need to use the statistics API with stat type set to “add”. You probably don’t want to use the Highscores API for this.

@djice: Check the AS3 API Integration thread.

 
avatar for Vegard20 Vegard20 188 posts
Flag Post

Im using actoscript2

 
avatar for Vegard20 Vegard20 188 posts
Flag Post

actionscript*

 
avatar for bubwee2 bubwee2 1 post
Flag Post

weeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

 
avatar for McCoyEVP McCoyEVP 341 posts
Flag Post

So is there any replacement of the ?debug_level=3, etc. that is available for the new chat interface?

 
avatar for DTran DTran 220 posts
Flag Post

The High Scores API is no longer available for new flash games, which I assume is why this topic is not stickied anymore.

 
avatar for UnknownGuardian UnknownGuardian 1703 posts
Flag Post
Originally posted by DTran:

The High Scores API is no longer available for new flash games, which I assume is why this topic is not stickied anymore.

What? I thought it was? Can’t games still send Highscore API?

 
avatar for DTran DTran 220 posts
Flag Post

I’m mistaken. It seems they’re cutting support for the High Scores API, but you can still use it if you want. They’re just not providing instructions or help. However, UG, the High Scores API is separate from the regular stats API. You could just use the High Scores API if you just wanted a leaderboard but didn’t want to submit any stats.

http://www.kongregate.com/forums/1/topics/49416?page=1

“- We’re cutting support to the “High Scores” API and have removed links to those tutorials. We still use the Statistics API that most people have been using, and we still support the API for both AS2 and AS3. I believe old games will continue working with the High Scores, but we will no longer provide support for those APIs. NOTE: This only affects developers using APIs – gamers will not see any difference. Also, we’re not removing APIs, we’re just no longer offering help or instructions for one of them so we can encourage developers to use the other one. Sorry for any confusion."

 
avatar for UnknownGuardian UnknownGuardian 1703 posts
Flag Post

Ahhh…now </thread>

Sign in to reply


Click Here