[Kongregate API] AS3 Integration page 4 (locked)

Subscribe to [Kongregate API] AS3 Integration 129 posts, 66 voices

Sign in to reply


 
avatar for TheoSoft TheoSoft 266 posts
Flag Post

Has anyone implemented the .swc in Flex 3?

If so, instructions?

I solved it. If you’re developing in Flex 3, just drop the .swc file into the libs folder of your project. This should be added to the instructions for people to know.

You can check this by going to Project → Properties → Flex Build Path → Library Path tab.

Click on the libs folder. If it’s not there or you haven’t dropped it yet, just click “Add SWC” on the right to find the file and add it.

Follow all the other instructions for implementation.

 
avatar for Cloud_9ine Cloud_9ine 2242 posts
Flag Post
Originally posted by Cloud_9ine:

What is the point in having both stats and scores, cant both be used for badges, also scores bit of the API seems much more capable than stats with the set mode that stats doesn’t have.

Still need some help guys, I want ot know all the difs between the two.

 
avatar for DeepClaw DeepClaw 546 posts
Flag Post

It would be nice if the API had a Disconnect() function.

Asked few months ago.

Something like that was rejected because it’s senseless. The cheater would make a Screenshot and get the badge.

 
avatar for Gamestove Gamestove 3 posts
Flag Post

Hi everyone,

I’m new to kongregate, but I like the idea of points, badges and achievements very much. I uploaded two games and I think I integrated the API correctly, but I don’t know how check that. In the comments people keep asking for integration and badges, so I’m confused. Is there a way for me to see wether I’m reporting statistics and highscores correctly? Is there a way to add badges myself?

Thanks!

 
avatar for Vara Vara 763 posts
Flag Post

Hi everyone,

I’m new to kongregate, but I like the idea of points, badges and achievements very much. I uploaded two games and I think I integrated the API correctly, but I don’t know how check that. In the comments people keep asking for integration and badges, so I’m confused. Is there a way for me to see wether I’m reporting statistics and highscores correctly? Is there a way to add badges myself?

Thanks!

Add ?debug_level=3 to the end of the URL from your game. (to see if the API works)
And you can’t make badges for your game. Only greg can do that.

 
avatar for Gamestove Gamestove 3 posts
Flag Post

Thanks for the tip Vara! It hangs on “Info: Listening for connection…”, so I guess I did something wrong, I just don’t know what.
Here is the code I use, it’s almost exactly the code from the API tutorial. I use FlashDevelop and AS3 and I’m trying to load the API manually:

In my main class:


private var kongregate:*;

private function loadKongregate():void
{
var paramObj:Object = LoaderInfo(root.loaderInfo).parameters;
var api_url:String = paramObj.api_path || “http://www.kongregate.com/flash/API_AS3_Local.swf”;
var request:URLRequest = new URLRequest ( api_url );
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener ( Event.COMPLETE, loadComplete );
loader.load ( request );
this.addChild ( loader );
}

private function loadComplete ( event:Event ):void
{ // Save Kongregate API reference
kongregate = event.target.content;
kongregate.services.connect();
}

In the constructor of my main class:


loadKongregate();

And to submit:


kongregate.stats.submit(“score”, score);
kongregate.scores.submit(score);

I really appreciate all your help, thanks!

 
avatar for Gamestove Gamestove 3 posts
Flag Post

Hi again everyone,

I finally figured out what’s wrong! It wasn’t the code after all, it was Mochiads encryption that somehow broke the API integration! So if you’re using Mochiads and you want to add the Kongregate API to your game, don’t use version control.
Phew, took me all day, but I’m sure every programmer knows this wonderful feeling when a really frustrating bug-hunt finally pays off. Yeah!!!

(Bughunt… maybe I’ll use this as the title for my next game…)

 
avatar for nicolaaa nicolaaa 14 posts
Flag Post

how to become a modo

 
avatar for IndieGumshoe IndieGumshoe 1 post
Flag Post

Hi do you have a zip format of the docs? thanks

 
avatar for ninetwozero ninetwozero 2 posts
Flag Post

My game breaks when uploading it on kongregate. It doesn’t seem to establish a connection until the end, when it’s supposed to submit the score. The submittion works after the second play, just to break when you try to play it a third.

What to do?

 
avatar for Phantasmagoria Phantasmagoria 728 posts
Flag Post

Connect when the game starts instead of at the end.

 
avatar for ninetwozero ninetwozero 2 posts
Flag Post

I’ve been trying to do that, but it just won’t work…

 
avatar for dooglus dooglus 3 posts
Flag Post
Originally posted by arcaneCoder:
The main method to submit high scores from the statistics class is called “submit”:

That should say ‘from the scores class’ I think.

 
avatar for Tyilo Tyilo 17 posts
Flag Post

The playerdata seems to work, except points which alway shows 0. Why? Can you fix it?

 
avatar for zaster888 zaster888 24 posts
Flag Post

Is the a site where i can learn AS3 or AS2?

 
avatar for skyboy skyboy 1230 posts
Flag Post

Google.

 
avatar for Melesta Melesta 4 posts
Flag Post

Is API available for Flex Builder 3 (Version: 3.0.194161)
I’ve added .swc, but Flex Builder cant uses it

 
avatar for Melesta Melesta 4 posts
Flag Post

All okay now, I’ve rename swс :)

 
avatar for eddandjack eddandjack 1 post
Flag Post

hey… i tried to upload the component… but now my flash program wont even open…
im not really sure what happened…

 
avatar for Blingman Blingman 1 post
Flag Post

I just want to know how/where to get the spftware to make the games

:0 ;) :( or may even this >.< <i hate uUUUUUUUUUUUUUUUUUUUUU!

 
avatar for ZigZaGame ZigZaGame 8 posts
Flag Post

hi we just uploaded our first game, and looks like we are about to win some prize money. However we did not do api integration. can we still claim the prize if we implement the api later on? also, how long does it take to integrate the api (assuming you take the sample fla way)?

 
avatar for Jabor Jabor 9707 posts
Flag Post

If you do win a prize in the contests, you have a period of time to implement the API in order to claim it.

It wouldn’t take long to implement the API – a few minutes to import the component and add the function calls, then it’s a matter of testing and ensuring it works as you want it to.

 
avatar for dasmitimsad dasmitimsad 1544 posts
Flag Post

:o I love your game
Im gonna play it again now.

 
avatar for guahanweb guahanweb 2 posts
Flag Post

Looking to integrate the API into a couple test games. Is there a sandbox available in which to test some user interaction without actually uploading the application for all to see?

Thanks in advance.

 
avatar for guahanweb guahanweb 2 posts
Flag Post
Originally posted by Blingman:

I just want to know how/where to get the spftware to make the games

:0 ;) :( or may even this >.< <i hate uUUUUUUUUUUUUUUUUUUUUU!

Don’t necessarily have to have any software. You can use notepad or text editor of your choice to write all the code, and then just download and install the free Flex SDK to compile the SWF. With the push of keeping the Flex SDK free, the “software” needed is minimal. Oh, and add to that that Adobe is giving away licenses to anyone currently unemployed for free, and it’s a totally open market.

Sign in to reply


Click Here