*New* [Kongregate API] Content Sharing page 5 (locked)

Subscribe to *New* [Kongregate API] Content Sharing 125 posts, 65 voices

Sign in to reply


 
avatar for flashdeath30 flashdeath30 1290 posts
Flag Post
Originally posted by dwew3:

lordofland, an api is like high scores for kong. they are intergated into the flash game using code.

@ dwew3, I think you should recognize spam, this is caps spam, an easy form to detect,

Flag and move on, flag and move on.

 
avatar for Stef1987 Stef1987 50 posts
Flag Post

Do you have to publish a game before the content sharing works ?
Cause I’m testing it currently in preview, and saving doesn’t seem to work (though I get no errors for it offline), browsing seems to work though (but there’s nothing to load).

Just want to know, because I’d rather test it before publishing it.

 
avatar for pinaflashdotcom pinaflashdotcom 1 post
Flag Post

So I made a red remover type game with the API integrated: Play it here
Currently it’s exclusive to Kong and Im starting to work on a distribution version. From what I understand I can submit levels from other sites but can’t do much else like browse them or load them is that correct? What’s the best solution? Link people to the Kongregate version with an explanation? Any ideas welcome.

 
avatar for pumpkins pumpkins 1 post
This post has been removed by an administrator or moderator
 
avatar for spikez11 spikez11 1 post
This post has been removed by an administrator or moderator
 
avatar for BlueBlaze BlueBlaze 3 posts
Flag Post

I agree ^^ with that dude :)

 
avatar for RegularKid RegularKid 2 posts
Flag Post

I see that a level name / description shows up when browsing user content levels ( Hexium and Fantastic Contraption Prius do this ), however I don’t see how those values are saved when you save a level from code. I see that it saves the content type, a label, a thumbnail and the actual level data itself ( which I’m assuming is probably going to be an XML string ). So, if that’s all you send up, does the data itself need to be formatted in order to provide the name of the level and the description? How does this work so that it shows up correctly in the level browser?

Thanks in advance!

 
avatar for CuriousGaming CuriousGaming 126 posts
Flag Post
Originally posted by RegularKid:

I see that a level name / description shows up when browsing user content levels ( Hexium and Fantastic Contraption Prius do this ), however I don’t see how those values are saved when you save a level from code. I see that it saves the content type, a label, a thumbnail and the actual level data itself ( which I’m assuming is probably going to be an XML string ). So, if that’s all you send up, does the data itself need to be formatted in order to provide the name of the level and the description? How does this work so that it shows up correctly in the level browser?

Thanks in advance!

You have to rely on your players. There are dialogue boxes for level name and description in the save box.

 
avatar for RegularKid RegularKid 2 posts
Flag Post

Thanks, CuriousGaming!

I never actually attempted to save anything so I didn’t know there was a popup on the website ( like the browser ) for that information. Now I know :)

Thanks!

 
avatar for jake12118 jake12118 14 posts
Flag Post

what do u do in this thing i mean theres no detail to it help me please thanks! please post this its awesome please ill be your best friend

 
avatar for jigglypuff101 jigglypuff101 6 posts
Flag Post

what do u do here

 
avatar for JWBSoftware JWBSoftware 53 posts
Flag Post

I’m interested in this for my game, but I can’t get it to work for me as a player. I cannot access user levels with either Hexiom Connect or Block Remover. Whenever I click on a level – in the pane to the right, listed below the game or in the overlay that appears – nothing happens. The game is still there with the default levels.

It fails the same way with both games. At first I thought it might be a problems with Hexiom, but with two games not working it seems it’s an issue with the level share system as a whole.

I’m using Safari 4 with Mac OS 10.5.8. It’s probably something to do with this, though I don’t know what. I’ve no ad-block software, the latest Flash installed, and tried switching off disabling pop-ups and clearing the cache.

 
avatar for leggecaleb leggecaleb 3 posts
Flag Post

how do u up lode

 
avatar for alecool34 alecool34 61 posts
Flag Post
Originally posted by Arkatufus:

Its easier to use Alcon if you need to trace and debug a deployed swf.

http://blog.hexagonstar.com/alcon/

Just remember to take the debug function out of the game when you’re ready to publish it.

ok

 
avatar for aaa694 aaa694 3 posts
Flag Post

Mine Was A FAIL ATTEMT

 
avatar for peahorn123 peahorn123 1 post
Flag Post
Originally posted by TheCuddlyOne:

Wow I love it when they find new ways to stop .sol file altering using ragnarok :) good on ya stopping those hackers

hi

 
avatar for abbott369 abbott369 2 posts
Flag Post

I think it is a pretty good idea Bold awesome

 
avatar for soleblade soleblade 12 posts
Flag Post

awsome

 
avatar for 1998mak 1998mak 1 post
Flag Post

hee

 
avatar for jamesandrew2k9 jamesandrew2k9 14 posts
Flag Post

YEPP THAT IS KOOL

 
avatar for soleblade soleblade 12 posts
Flag Post

this is pretty cool i guess

 
avatar for jamieisawesome jamieisawesome 1 post
Flag Post

why dont you just do that there is no point in not doing it you can take it off if you want

 
avatar for andy760 andy760 4 posts
Flag Post
Originally posted by Jim7:

Overview


Kongregate’s Content Sharing API makes it easier than ever for developers to add features like custom level sharing to your games. The new API gives your players the ability to:

Save in-game content like levels, characters and game customizations to Kongregate’s servers for easy retrieval any time and from any computer.

Browse publicly shared, user-generated content through Kongregate hosted UI (see example)

Share in-game content easily via direct links, email or by posting to top social media sites. (No more copying and pasting of long, ugly text strings!)


This API is available to use now, and we urge you all to check out the first integration of level sharing in Hexiom: Connect and grab the complete documentation here.

Connecting to the new API is very easy – in fact, the Content Sharing API is built on top of the same Kongregate API that you’ve been connecting to for statistics! Note though that it’s only available in the AS3 API and you must load the API manually – the component loading method will not work with Content Sharing. When using this service, it is important that you register content load listeners prior to calling connect() on Kongregate API.




Example

Typical Kongregate API loader with load listeners added for Shared Content:

import flash.display.LoaderInfo;
import flash.display.Loader;
import flash.net.URLRequest;
import flash.events.Event;

// Pull the API path from the FlashVars
var paramObj:Object = LoaderInfo(root.loaderInfo).parameters;

// The API path. The debug version ("shadow" API) will load if testing locally. 
var api_url:String = paramObj.api_path || "<a href="http://api.kongregate.com/flash/API_AS3_Local.swf&amp;quot;"&gt;http://api.kongregate.com/flash/API_AS3_Local.swf&amp;quot;&lt;/a&gt;;

// Debugging info
trace ("API path: " + api_url);

// Load the API
var request:URLRequest = new URLRequest ( api_url );
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onApiLoaded);
loader.load(request);
this.addChild(loader);

// Kongregate API reference
var kongregate:*

// Called when API swf finishes loading
function onApiLoaded(e:Event):void {
  
  // Save Kongregate API reference
  kongregate = e.target.content;
  
  // Register the shared content load listener before connecting to Kongregate services
  kongregate.sharedContent.addLoadListener('Level', onLoadLevel);
  
  // Connect
  kongregate.services.connect();
}




Each game may save up to 10 different types of shared content, so the possibilities of what you can do with this API are nearly endless.

 
avatar for andy760 andy760 4 posts
Flag Post

import flash.events.Event;

// Pull the API path from the FlashVars
var paramObj:Object = LoaderInfo(root.loaderInfo).parameters;

// The API path. The debug version (“shadow” API) will load if testing locally.
var api_url:String = paramObj.api_path || “”http://api.kongregate.com/flash/API_AS3_Local.swf&amp;quot;&quot;&gt;http://api.kongregate.com/flash/API_AS3_Local.swf&amp;quot;&lt;/a&gt;;

// Debugging info
trace ("API path: " + api_url);

// Load the API
var request:URLRequest = new URLRequest ( api_url );
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onApiLoaded);
loader.load(request);
this.addChild(loader);

// Kongregate API reference
var kongregate:*

// Called when API swf finishes loading
function onApiLoaded(e:Event):void {

// Save Kongregate API reference
kongregate = e.target.content;

// Register the shared content load listener before connecting to Kongregate services
kongregate.sharedContent.addLoadListener(‘Level’, onLoadLevel);

// Connect
kongregate.services.connect();

 
avatar for jake12118 jake12118 14 posts
Flag Post

what is this?

Sign in to reply


Click Here