Be a Supporter!
Response to: Help in a match game Posted July 25th, 2012 in Game Development

You can look up tutorials for tile based maps that involve arrays, the concept used is very similar for a match game. I doubt you will find a tutorial that lets you copy/paste a ready made game (which I'm thinking was your idea).

Response to: AS3 External Preloader Posted July 20th, 2012 in Game Development

At 7/20/12 12:58 PM, jujaswe wrote: I have a simple question. Since my preloader.swf is a separate file from my main game, how will I upload them in a website? I mean how do I upload them both?? Do I need to import the preloader into my main game or compress the swf files or something?

You got a "preloader.swf"? It loads only itself? :D
Man, of course your preloader code/animation needs to be in your game swf. Should be a 5 second copy/paste job, unless you've completely messed up your preloader.

Response to: [AS3] Sending param to event func Posted July 18th, 2012 in Game Development

At 7/18/12 12:21 PM, Knight52 wrote: The variable names are what I'm trying to pass into the function

Every event object knows the name of the object that triggered the event. The object that triggered the event is the property currentTarget. So to get the name, example:

function (e:Event):void
{
trace(e.currentTarget.name); 
}
Response to: [AS3] Sending param to event func Posted July 17th, 2012 in Game Development

At 7/17/12 10:07 AM, Knight52 wrote: OK, so I need to build a class that extends SimpleButton to pass those parameters. Am I correct?

No idea what you are trying to do, but the correct answer to your original question is to make a class that extends the EventDispatcher class; you will be making a custom event that holds the extra properties you want to pass.

Response to: Looking for a flash developer!! Posted July 16th, 2012 in Game Development

Is this a payed job?

Response to: Class not working Posted July 13th, 2012 in Game Development

At 7/13/12 12:47 PM, shoopdanorris wrote: I don't think the problem is that the function isn't correct, I think that it won't run. How to I make it to this?

With the troll face as your avatar, I can't tell if you are being serious. Good luck with your problem.

Response to: Class not working Posted July 13th, 2012 in Game Development

At 7/13/12 12:07 PM, shoopdanorris wrote:
At 7/13/12 10:28 AM, Diki wrote: What happens when you try to instantiate the class? Do you get errors?
Nothing happens at all. No errors or anything.

Why do you have this class Blockplace? Looks like completely useless class as you are attempting to add the created dBox to the stage. Are you sure your class knows the 'stage' object? Does your dBox class have a graphic attached to it so you can actually see when it's added?

Response to: As3 Shadows Posted July 7th, 2012 in Game Development

At 7/7/12 10:10 AM, jujaswe wrote: Is there a way to put a parent on top of its child??

Is that a riddle? Or a trick question perhaps. Let's see, the parent contains the child, so like a box contains an object. Can it be said that the box is on top of the object when the object is inside of the box? I guess not. So the only way I can think of this to be possible is that if you put a black wall around the box so you can't see the box but you know it's there and then ask is the object on top of the box and because you can't see it, you must assume that the object is in the box and on top of the box at the same time. Did I get it right?

Response to: Help! Using As3, Php, And Txt Files Posted July 6th, 2012 in Game Development

At 7/6/12 01:18 AM, Venks wrote: But I can't remember how to do this or where to find that tutorial.
Anyone here know how to do this?

Did you try google? Should be super simple to find a tutorial like this. The key classes to make this happen are URLVariables and URLLoader. Check them in the as3 references.

Response to: Can't Access Xml In Flash Online Posted July 5th, 2012 in Game Development

At 7/5/12 12:38 AM, IndigenousDigitalist wrote: So I have a game for Robot Day, and I have a MySQL database that I access through PHP that creates XML that then goes into Flash (yadda yadda). The XML works fine when I test the file on my computer through Flash, but when I put the file online I can't access the XML. Does anyone know why this may be?

You need to have crossdomain.xml on your server root folder. Google it and you can find easy copy/paste of it.

Response to: control music with action script Posted July 4th, 2012 in Game Development

At 7/4/12 07:00 AM, hummerh14 wrote:
At 7/3/12 11:23 PM, MintPaw wrote: Learn to use the internet. . .

Second link, real easy stuff, don't waste other's time. Unless you actually need personalized help.
thanks could of gone with out the smartass comments but whatever thats newgrounds for ya.

That's life for you. You are 17 according to your profile, so a modern kid. It's amazing how stupid you are in finding information on the internet.

Response to: Game Jam 7: Finished Games Posted July 2nd, 2012 in Game Development

At 7/2/12 01:30 AM, JoSilver wrote: Reposting.

TEAM: MONKEY BARREL!
CORE MECHANIC: FREEZE!
http://www.newgrounds.com/portal/view/598339

Oh wow. Looks like the first level can only be completed if Saturn aligns with the moon on your mothers cousins cats birthday.

Sry, your game frustrated the heck out of me
Response to: Game Jam 7: Finished Games Posted July 2nd, 2012 in Game Development

At 7/1/12 11:29 PM, Himynameisjacob wrote: Core Mechanic: Hide
http://www.newgrounds.com/portal/view/598320
This was a great experience, and I definitely plan to sign up for the next Jam. Hopefully I'll make it in again, haha.

I'll be checking out the other games shortly!

Good game. It might be the winner :).

Response to: Dealing with .fla bloat? (Flash 8) Posted June 27th, 2012 in Game Development

I read some bits and pieces in this thread. It looks like you got a shitty mac which is incompatible with everything and can barely run notepad (or the mac equivalent of notepad). What was the purpose of this topic again? There is an old joke that pretty much says when your mac breaks or can't fulfill your needs anymore, you throw it in the trash and buy a new mac. If you are looking for tips and tricks to get your mac working better, then there is none. Follow the joke advice which in closer inspection isn't a joke at all.

Response to: My Game Is Laggy Posted June 22nd, 2012 in Game Development

At 6/22/12 11:00 AM, LifeShadow wrote: Hey guys
When I add a simple animation to may platformer (AS2) the character becomes slow and laggy till the animation
stops .. how can I fix that ?

Your game is laggy? Ok, simple fix is to remove the lag.

Response to: AS3 Help with mouseclick events Posted June 20th, 2012 in Game Development

At 6/20/12 12:06 AM, LikeALeon wrote: They are the linkage names I gave my sounds. I've just put in what you suggested, but it's still only playing the first sound.

The code is correct. You are messing up somewhere else. Where is this code located? I'm guessing on a frame. Do you come to this frame often? Because every time you come to that frame, it runs the frame code which means index is set to 0. Just for the fun of it, put a stop(); on top of the code.
Other option could be that you got 5 sound files that are all the same sound.

Response to: AS3 Help with mouseclick events Posted June 20th, 2012 in Game Development

At 6/19/12 11:51 PM, LikeALeon wrote: It shows me [class sound0] each time I clicked. I'm guessing it should be an object and not a class?

So what are the sound0, sound1, sound2 etc.? Are those the linkage names you gave your sounds in flash? In that case you need to instantiate them.

sounds.push(new sound0());
sounds.push(new sound1());
etc.

Response to: AS3 Help with mouseclick events Posted June 19th, 2012 in Game Development

At 6/19/12 11:38 PM, LikeALeon wrote: But if I do it that way, no sound plays at all, and I get the error "play is not a function".

That would suggest that you haven't added actual sound objects into the array. Trace the array value at the index in the function and tell me what you see. You should see something like [object Sound] being traced if it is a sound in there.

trace(sounds[index]);

Response to: AS3 Help with mouseclick events Posted June 19th, 2012 in Game Development

At 6/19/12 11:06 PM, LikeALeon wrote: var playing:Sound = new sounds[index]();
playing.play();

What's that supposed to be? If you are actually playing one sound with that code, I'm little surprised. Just use the code I gave as it works. I don't know why you want to create this "playing" variable which is useless. The array already contains the sound variable, so calling play() on it is same.

Response to: AS3 Help with mouseclick events Posted June 19th, 2012 in Game Development

At 6/19/12 10:40 PM, LikeALeon wrote: I went back to mine, so that is what I'm using. But with yours, I had this:

playButton_btn.addEventListener(MouseEvent.CLICK, playSound);

var sounds:Array = new Array();
sounds.push(sound0);
sounds.push(sound1);
sounds.push(sound2);
sounds.push(sound3);
sounds.push(sound4);
sounds.push(sound5);

var index:int = 0;

function playSound():void
{
sounds[index].play();
index++;
if (index >=5) index = 0;
}

It compiles, but when I tried clicking the button, I got an argument count mismatch on playSound, expected 0, got 1.

You are making the example function I gave you into your event function, obviously that doesn't work because event functions need to have the event object.

function playSound(e:MouseEvent):void {

Response to: AS3 Help with mouseclick events Posted June 19th, 2012 in Game Development

At 6/19/12 10:13 PM, LikeALeon wrote: Here's the code I had so far before I tried yours:

Umm, post the code you are currently using.

Response to: AS3 Help with mouseclick events Posted June 19th, 2012 in Game Development

At 6/19/12 02:02 PM, LikeALeon wrote: Hello all,

I'm creating an animation that involves clicking on a button, and then 1 of 7 internal sounds playing. Originally I had a random sound play every time the button was clicked, but she would prefer if there was a linear sequence (so, clicking the button the first time would play sound 1, second time sound 2, etc). Naturally, once the library of sounds is exhausted, it needs to go back to sound 1 and repeat. I'm very new to AS3, and though I was able to figure out how to play a random sound, this has me stumped. Can anyone offer some ideas?

Put the sounds in an array and have a running number to tell you which sound to play. Example:

var sounds:Array = new Array();
sounds.push(sound1);
sounds.push(sound2);
sounds.push(sound3);

var index:int = 0;

function playSound():void
{
sounds[index].play();
index++;
if (index >=3) index = 0;
}

Should not be anything hard about that, but ask if you didn't understand.

Response to: Scripting Issues Posted June 19th, 2012 in Game Development

That's a bit messy to read, try to use the < .code> tags. As a general tip for solving your own problems; what I like to do is to go through the code (without running it) and really think what each line does. Like for example when you come to an if-clause in your code, what value is it when it comes to this point and what action is run because of it. You kinda go through your code like those puzzles on paper where you draw a line from start of the maze to the end of the maze. Not sure if I'm explaining this well (probably arent), but hopefully it will help you a little to solve your problems. That way of going through your code can help you solve those logic problems in your code.

Response to: Alright peeps I'm back (again...) Posted June 17th, 2012 in Game Development

At 6/17/12 07:25 PM, Archxiao wrote: So, I have another question with flash and/or actionscript. As in games you can change weapons (I will use CC as a reference, which is this 0:45-0:48) how do you complete this task? Do I have to create each character with the weapon in hand?

There are no weapons in actionscript or flash. You really need to get down some basics and then ask the right questions. "How do i mak my hero fly and shoot lazorss".This kind of questions are really stupid, and I'm not blaming you or anything because you are obviously a beginner so please don't take offense in this. Read some basic tutorials and learn what a "weapon" really means, then ask the correct questions.

Response to: Can't load external file from NG? Posted June 17th, 2012 in Game Development

When doing cross domain calls you need to have the crossdomain.xml file on your server. Here is the simplest form of crossdomain.xml that allows all connections:

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>
Response to: FlashDevelop cuddle curly brackets Posted June 16th, 2012 in Game Development

At 6/16/12 08:45 PM, Kirk-Cocaine wrote: This is awesome:

private function goodBraces():void{
trace("Cool beans");
}

This is vomit:

private function badBraces():void
{
trace("This is a plague");
}

Naw man. Your cool beans give people diarrhea. The plague is of pleasure and everybody enjoys it.

Response to: This is Your Final Chance. Posted June 14th, 2012 in NG News

There have been several comments that said this already, but I think it's worth repeating. Why won't you aim for lower amount of cash, like 5k (you already got more than that), and use that to make a pilot episode. Show the pilot to people and say "you see how cool this is, you want us to make more? Give us your money", that would actually work. Instead of what you are doing now is saying "hey we got a good idea and we think it would be cool to make it, give us your money", ummm, nope.

Response to: static class troubles Posted June 14th, 2012 in Game Development

Flash can't find the class. So in a nutshell: "engine.utils.Maths" path is wrong. Find out where the class really is located. And tbh, I don't understand why you are trying to make it work in flash when you say you have flash develop and everything works fine there.

Response to: Random Interval Spawning As2 Posted June 14th, 2012 in Game Development

At 6/14/12 09:23 AM, doobs110 wrote: Thanks for the response~! I have changed the times and the clouds are spawning after I hit play. The problem is, once the clouds spawn they are just sitting there. There is no movement at all! :( here is a link to the swf in the dumping grounds: http://www.newgrounds.com/dump/item/3b9c748d14341b09c855748f b4502a8c. You will see that the clouds don't begin to spawn until you hit the play button and the game restarts from the beginning (my background music also begins when you hit play). Also, side note, the about button has not been linked to anything yet so it doesn't do anything! :P Cheers!

Seems like a case of copy/paste. As you can see, you got no clue what's going on. I'll give you the best advice; write your own code and understand what you wrote.

Response to: The Flash 'Reg' Lounge Posted June 12th, 2012 in Game Development

At 6/12/12 04:35 PM, alwayssim wrote: Turns out I had written sharks.rotation instead of sharks[i].rotation in one location. No error message so I never knew anything was up. I'm so satisfied now I've found it, but annoyed that it was something so tiny and stupid.

Anyone else got any annoying stories like this?

What program are you using to write your code? If you call for 'rotation' property on an array, which obviously doesn't exist, you should get an error. Get Flash Develop immediately, would save you from these things :).

But speaking of annoying errors, I had one today. I'm making a game that loads an image from a server, and I made multiple changes to the image and uploaded it to the server again replacing the old one. But my game didn't want to load this new image. I was very puzzled about this, and found out like after an hour trying to figure it out that it was firefox who refused to load the image again. It was pulling the old image somewhere else for some odd reason. Not even ctrl f5 refresh helped the problem. I used to be a supporter of firefox, but after this ordeal Chrome looking much better to me. I still do not quite understand how firefox prevents a swf from loading an image from the server and rather insert the old image somewhere between there.