Recent posts by LiSchStudios on Kongregate

Flag Post

Topic: Kongregate / Kong + for devs.

LOOOOOOL. 100 plays? Are you serious? More like 100,000 or something.

 
Flag Post

Topic: Anti-Idle: The Game / -

Failiure to recieve a Lv. 8 gem from the Awesome Adventures.

Hello tukkun,

I was playing the awesome adventures, and I successfully robbed a lv.8 gem from a FCG player, however, when I checked LOLMarket, I saw none to sell!

Please fix this bug- I have encountered it several times. Thanks!

PS: So many people on Kongregate are illiterate, it bothers me >_<

LiSchStudios | 794 / 1,670,755,875 | v1,420 | WIN 10,2,159,1

 
Flag Post

Topic: Game Programming / Problem Connecting in AS3

So how would I use shared content, and other functions not in the class?

 
Flag Post

Topic: Game Programming / Problem Connecting in AS3

Wow… thanks so much! I’ll try that out really soon :D

 
Flag Post

Topic: Game Programming / Problem Connecting in AS3

Yep. They are not working, as well as the username and shared content

 
Flag Post

Topic: Game Programming / Problem Connecting in AS3

Sorry >.< Thanks for the link :D

 
Flag Post

Topic: Game Programming / Problem Connecting in AS3

The code I used to connect is exactly the example on this page. http://www.kongregate.com/developer_center/docs/loading-the-as3-api

Here it is though:


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

stop();

// Pull the API path from the FlashVars
var paramObj:Object = LoaderInfo(root.loaderInfo).parameters;
 
// The API path. The "shadow" API will load if testing locally. 
var apiPath:String = paramObj.kongregate_api_path || 
  "http://www.kongregate.com/flash/API_AS3_Local.swf";
 
// Allow the API access to this SWF
Security.allowDomain(apiPath);
 
// Load the API
var request:URLRequest = new URLRequest(apiPath);
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
loader.load(request);
this.addChild(loader);
 
// Kongregate API reference
var kongregate:*;

function onLoadLevel(params:Object){
	MovieClip(root).passLevelCode=params.content;
	MovieClip(root).gotoAndStop("PlayEditedLevel");
}
 
// This function is called when loading is complete
function loadComplete(event:Event):void
{
	trace("API LOADED");
    // Save Kongregate API reference
    kongregate = event.target.content;
 

    kongregate.services.connect();
 	
	MovieClip(root).kong=kongregate;
	play();
}

I then just send stuff through the API through MovieClip(root).kong

 
Flag Post

Topic: Game Programming / Problem Connecting in AS3

Hmm…

What did you put in the Kongregate class?

The connection code?

Could I see it perhaps please? _

 
Flag Post

Topic: Game Programming / Problem Connecting in AS3

The API, you mean?

 
Flag Post

Topic: Game Programming / Problem Connecting in AS3

Do you mean that I must make my game public (not as a preview on Kongregate) before it works?

I’ve been testing it as a preview

 
Flag Post

Topic: Game Programming / Problem Connecting in AS3

I’m having trouble getting my game to connect to the kongregate API in AS3.

I’m just grabbing the API connection code directly from the example in the documentation – I just copied the example exactly- and placing it on the first root frame in my timeline.
http://www.kongregate.com/developer_center/docs/loading-the-as3-api

I see the shadow services loading locally, but when I uploaded my game to Kongregate, I can not save stats, get the user’s kongregate user name, or use the shared content API.

Am I using the wrong connection code? Or is there something else that I have to do?

 
Flag Post

Topic: Game Programming / Problems With Shared Content API

Hmm. I do get that message when locally testing.

I’m assuming that the root stage counts as in the display list…

Do you think there is some other reason that it won’t connect? Security settings? I really don’t know? D:

 
Flag Post

Topic: Game Programming / Problems With Shared Content API

When I try to get my username in the game, it always outputs “guest”… leading me to believe that you are correct, and I’m not connected.

Here’s the username code BTW: username.text=MovieClip(root).kong.services.getUsername();

I’m just grabbing the API connection code directly from the example – I just copied the example exactly- on this page
http://www.kongregate.com/developer_center/docs/loading-the-as3-api

Do you have any idea why the game wouldn’t be connecting correctly? This game is in AS3, but all of our AS2 games connect fine..

 
Flag Post

Topic: Game Programming / Problems With Shared Content API

Hmm

I’m not sure if my stats are working: Should they be showing up in the preview? I do submit stats during the game (and I tested one, but nothing appeared).

Should I show you my entire connection code?

Thanks for your help :D

 
Flag Post

Topic: Game Programming / Problems With Shared Content API

Hello:

I am attempting to use the shared content API, but nothing that I do seems to work.

In the following code, I am simply adding the event listener, connecting, then requesting to browse the levels

[

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

// Register the shared content load listener before connecting
kongregate.sharedContent.addLoadListener(“Level”, onLoadLevel);

// Connect to the back-end

kongregate.services.connect();

kongregate.sharedContent.browse(“Level”);

]

But, no “browse” window pops up, and as well, the save mechanism does not work.

When testing locally, I get this error message

[
Kongregate API: IKongregateServices.connect()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.kongregate.as3.client.services::SharedContentServiceShadow/browse()
at moneyballV0_fla::MainTimeline/loadComplete()
]

When I test on Kongregate, nothing happens :/

Does anyone with any experience this know what the problem is? Thank you!

 
Flag Post

Topic: Game Programming / Jumping game.

Rofl

 
Flag Post

Topic: Game Programming / Problems With Shared Content API

I am implementing the shared content API into my game, but I have encountered a problem.

When I attempt to retrieve user made levels, nothing happens and I get this error when testing locally: (nothing happens at all when testing on Kongregate)

ReferenceError: Error #1069: Property sharedContent not found on com.kongregate.as3.client.services.KongregateServiceShadow and there is no default value.

Here is my connect code:

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

// Register the shared content load listener before connecting

kongregate.sharedContent.addLoadListener(‘Level’, onLoadLevel);
function onLoadLevel(params:Object){
//CODE REMOVED
}

// Connect to the back-end

kongregate.services.connect();

}

And here is my level retrieve code:

kongregate.browse(‘Level’, kongregate.BY_RATING);

Does anyone know what my problem is?

Thanks in advance :D

 
Flag Post

Topic: Game Programming / OnMoveMouse misbehaving

Hm… I’m not really sure… but for your bonus question, look at this:

http://www.internaldrive.com/2008/12/19/referencing-main-class-in-flash-actionscript/

 
Flag Post

Topic: Game Programming / I want to Beta Test

Meaning… another person’s game?

 
Flag Post

Topic: Game Programming / Enemies doesn't kill

I see a few potential problems here:

1) Is root.enemies a variable? Or on the for(n=0; n<root.enemies; n++){ have n<enemies?

2)You clear “scoreInterval”, yet it appears that you never declare this…

3) I’m assuming that there is a fourth frame on the main timeline, correct?

4)Is both the code and the “char” MovieClip on the main timeline?

Hope this helps…

 
Flag Post

Topic: Game Programming / Shared Content Function Not Working

Yeah, the statistics API does work, and submits the stats to kong. When we debug the swf, no errors pop up, and it immediately sends us to the incorrect screen. Also, no “Yes or No” prompt appears on our screen when we have the swf running on Kongregate.

 
Flag Post

Topic: Game Programming / Shared Content Function Not Working

Hello. For our newest game, we have created a level editor, and are attempting to implement the Kongregate shared content API. Unfortunately, we have not been able to get it to work.

Here is our initial setup code: (Excluding everything non – relevant to this thread, but it IS there)

kongregate = event.target.content;

MovieClip(root).kong=kongregate;

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

And here is our share function:

MovieClip(root).kong.sharedContent.save(“Level”, MovieClip(root).passLevelCode, onSaved, l , name);

function onSaved(params:Object) {
if (params.success) {
MovieClip(root).gotoAndStop(“LevelSubmitted”);
} else {
MovieClip(root).gotoAndStop(“LevelErrorSubmitted”);
}
}

All of the variables have content and are not empty.

But, when we test it and press submit, the error screen automatically appears, even when we test it on Kongregate

Is there a way to access the error code? Such as params.error, so we could see what the problem is?

 
Flag Post

Topic: Transformice / Transformice Training Academy (TTA)

The oath: I mfranzs Swear to teach to the best of my ability,To Remove trolls when possible, and to not hack while in one of the academy’s rooms.