Recent posts by DeepClaw on Kongregate

Flag Post

Topic: Kongregate / New Kongregate Version: CR 2010.08.25

Originally posted by Phoenix00017:

DeepClaw – Uh…what? Seriously, are you seeing longer loads, or just joking?

That was no joke.

In FF the games loads just fine.

In Opera (same PC = same Firewall etc) i took me 2minutes to load.
Tested on the same game.

Flag Post

Topic: Kongregate / New Kongregate Version: CR 2010.08.25

Wow, the page take now MUCH longer to load.
Let’s visit ArmorG while Kong loads yawn

Flag Post

Topic: Kongregate / 5000 points

Originally posted by The_3lder:
Originally posted by 123aaa789:
Originally posted by y0ttabyte:

15000 < 30000


43805 > 30000
I dare someone in the top 18 to post now…

43947 > 43805


51662 > 43947

Flag Post

Topic: Kongregate Multiplayer Games / [Heroes of Gaia] Glitches/Bugs

You can only heal 75% of wounded troops.

If you only loose one, you won’t be able to heal it.

Flag Post

Topic: Kongregate / On the new challenge...

No, it’s not like a kongai card.
The Kongai card is shown in your profile.
This challenge NOT.

Flag Post

Topic: Kongregate / I got all the weapons..

being in the leader list helps too ;)

Flag Post

Topic: Game Programming / Security.allowDomain()

will it still fail with users who have only Flash 10?

yes, it will.

Whats the big difference between them?

Adobe has an article about xss and flash9



Won’t it be better, if you only enter the DOMAIN, not the whole path to the file you want to load?

Flag Post

Topic: Game Programming / Security.allowDomain()

It depends on the player you are using.
Flash 9 and older don’t need them, only if you are using 10 and newer.

Flag Post

Topic: Game Programming / API giving me error #1010 (Solved!)

When I test it on the site, I get the green light, but no score submission.

The green light was removed months ago.
What you see now is the green plug. It only show, that you are able to chat. It don’t show the API connection.

if it don’t even execute trace("Initialized"); then your class never get initialized.
Like Curious asked, how do you create an instance of the Main class?

Flag Post

Topic: Game Programming / AS3, preloader problem

I thought flash cs3 or 4 is what most people use ?

That’s right!
But most people don’t like coding. They prefer drawing the most stuff and animate it using the timeline.

Flash CS isn’t suitable for coding.

Flag Post

Topic: Game Programming / AS3, preloader problem

so there’s no other way but to write the code in the “Actions – Frame” window, instead of in the document’s class .as file ?

You still can write it in “document class”.
Sounds like you use Flash CS. There is a setting “publish into first frame”. Uncheck this setting to ALL of your stuff but preloader.

the code of the first frame only begins when everything is already loaded

That’s because ALL your stuff is in the first frame.
Flash only execute the first frame, if it is fully loaded. If your game has only one frame, then flash will wait until your whole game is loaded.

Flag Post

Topic: Game Programming / AS3: Relative locations with movieclips and classes

The private var and public var part didn’t make a lot of sense.

Why not?
This vars are inside the class, not a function. You need to specify their visibility.
Make them private – that way you can access them within the class.

Making a private var for the char in the Gun function doesn’t make sense.

You need a reference to your char object within the gun class.
Using static variables isn’t the best way to solve it.

And would I call the Gun function in the Char class?

nope. You only call it from the Game class.

Flag Post

Topic: Game Programming / AS3, preloader problem

(It’s like the swf waits for everything to be loaded before it shows anything at all)

That’s true…. if you have only ONE frame. Thats why you should put your preloader into the first frame and anything else into the second. That way flash will launch the preloader after the first frame is ready.

Flag Post

Topic: Game Programming / AS3 question

maybe you try remove it twice?

btw: that way you remove only the visible part. it still remains in the memory.
It will continue to listen to events.

Flag Post

Topic: Game Programming / AS3: Relative locations with movieclips and classes

Char is a class. you need an instance of it first:

  var char:Char = new Char();

After it you should add it to your stage or any other DisplayObjectContainer, which is somehow on the stage.
Do it in you Game Class.

Also, if you want use your Class Char as a MovieClip, you should extend MovieClip:

  import flash.display.MovieClip;
  public class Char extends MovieClip {

Cause your Gun Class need a reference to your Char Instance, you should change your Gun into something like:

  private var char:Char;
  public function Gun(char:Char) {
    this.char = char;

That way you can access char from your Gun Class.

well… now back to your Game Class:

  var char:Char = new Char();
  var gun:Gun = new Gun(char); // pass you char to the Gun Class
Flag Post

Topic: Game Programming / Shared Objects [AS3]

How do I determine what number I need that to be?

easiest way: save the biggest possible “cookie” and then look at the size of it. The size depends on the used language ( as2, as3), the name and the type of stored data.

How does that speed up progress?

It reserve the specifed space for the cookie. so it only sends one request to flash player. If the user set space to unlimited, you may not notice any speeddowns, but if the space is limited you won’t ask for more space everytime you save.

Can you give me a good example of that last function?

I made a class “Settings” with a function readString(String):String and a function writeString(String, String).
This functions are static, so i don’t need a pointer of Settings. If i want to read a value from the cookie, i just need to type this:

  var foo:String = Settings.readString("foo");

It’s shorter and better ( since you only open your cookie once ). You can access your cookie from your whole project.

shared objects are stored in your appdata, which is hard to get to

just enter %APPDATA% on any windows-machine.

Flag Post

Topic: Game Programming / Shared Objects [AS3]

you may add a number to flush:


It could speed up the save progress.

Your code should work.

If you don’t want to hardcode your names, you could use vars instead:

var usr:String = "username";[usr] = "user1337";

That way you could make public functions to read your SharedObject.
Only open the SharedObject once in your class and use the function to access it:

readString(name:String):String {
Flag Post

Topic: Game Programming / [Solved[ for checking with null lists.


  else if (this.x > 50 + Main.sBackground.x); {

remove the ; after the if condition.

Flag Post

Topic: Game Programming / [Solved[ for checking with null lists.

you should check the list for a reference before you access it first.
Like Brain told you to, put the if before your loop.

if(FriendlyShip.list != null) {

you could use instead:

if(FriendlyShip.list) {

But the best way would be: don’t delete your list, don’t set it to null.
Instead, remove the objects from your list, so it would be empty.

btw: your code would only check the first ship in your list.
If hitTest true, it takes damage. Else it just keep flying without check any other ships.

Flag Post

Topic: Game Programming / Showing children AS3

Originally posted by Moonkey:

Instead of casting directly like that, I find it better to use the as operator. If casting fails using as, it returns null instead of throwing an error.

I prefer to use the is operator.
Just check if you match the class before you try to cast it.

if ( is ToggleButton) {
  var tb:ToggleButton = as ToggleButton;
  tb.addToolTip(tb.parent.mouseX, tb.parent.mouseY);
Originally posted by KMAE:

Edit: maybe I should be trying to add it to the parent?

That could also solve your error.
Another way would be to make the tooltip “invisible” for the mouse, so it wont launch any MouseOver Events.

  toolT.mouseEnabled = false;
  toolT.mouseChildren = false;

You need to execute it only once. ( put it into your constructor of the tooltip )

Flag Post

Topic: Game Programming / [Solved] I am completely stuck AS3

emptyBottleBtn:ToggleButton = new ToggleButton();

If you want to define a new var, you should put the keyword var in front of it.
Else, remove the :ToggleButton part.

choose one of them:

emptyBottleBtn= new ToggleButton();
var emptyBottleBtn:ToggleButton = new ToggleButton();
Flag Post

Topic: Technical Support / Battalion: Ghosts hard badge bug

Originally posted by UltimateChaos:

The Card isn’t checking either

same here. finished 2 missions, still need 5 more.

Originally posted by Protoblob:

I finished Mission 1 on hard but the box doesn’t check.

finished mission2 on hard. box doesn’t check.

Flag Post

Topic: Game Programming / How can I reduce code for clickable objects

At the moment I’ve simplified it by taking out the inventory and just having multiple instances of one object

You won’t have the error, if you would keep only one instance of your objects and move them between the room and the inventory.

event.currentTarget.visible = false;

don’t set it to invisible. REMOVE it from your Stage. If it invisible it could still listen to Click Events. (had that issue in my mingames)

But back to your question…

I’m looking for a catchall […] so that I can just have one eventListener for all my objects

You could add your EventListener in the container, which stores all your items.
If you add the EventListener to this container, then currentTarget would be the container.
So add the Listener from container to every item with the same callback function.

Flag Post

Topic: Game Programming / Countdown?

you need to initialize it too.

  addEventListener(Event.ENTER_FRAME, onEnterFrame);

best to put into the constructor of your class.
But you can try to put it in the timeline too.

Also you need an Textfield with the instancename textfield to work my example.

Flag Post

Topic: Game Programming / Countdown?


var cnt:int = 90;

function onEnterFrame(e:Event):void {
  textfield.text = "Ticks left: " + cnt;

  if (cnt <= 0) {
    // do something

well, you need to assign that function to ENTER_FRAME. It’s just an example. Work with it.