Be a Supporter!
Response to: Cowbell - You Know You Want It Posted April 16th, 2010 in General

At 4/16/10 05:36 AM, BaronVonBadGuy wrote: WE NEED MORE COWBELL$!

Cowbells time, everybody!

Cowbell - You Know You Want It

Response to: Rickroll'd Nyc Subway Posted April 11th, 2010 in General

Well that was pretty neat! The audience was shit though..

Response to: Photoshop whats for dinner? Posted April 11th, 2010 in General

At 4/11/10 06:19 AM, Roytheshort3 wrote: Firefox, Chrome, And A Peice Of Crap.

It's funny because IE is better than Chrome and Firefox combined.

Response to: The last time I shat myself. Posted April 11th, 2010 in General

Why are you bumping a 5 year old thread?


The letters on my keyboard are not responding when I hit them. All other keys do!

function downKeys2(event:KeyboardEvent){
trace("you pressed " + event.keyCode);
}

stage.addEventListener(KeyboardEvent.KEY_DOWN , downKeys2);
Response to: Desperate Defender Posted April 9th, 2010 in Game Development

Why are the evil bosses smiling when the main character is sad? :(
Looks nice though, good luck!

Response to: What's your BMI? Posted April 7th, 2010 in General

20, am I cool yet?

Response to: Newgrounds in 20,000:1 contrast Posted April 7th, 2010 in General

There won't be any more posts better than the first three ones in this thread.

Response to: Shoutbox or somethin for flash help Posted April 7th, 2010 in Game Development

NG chat would be a good thing for that but it is a myth, so....

There are a few sites you can ask questions about Flash, but I've only seen ones where you have to pay in order to see the answer.

Response to: KeyboardEvent Posted April 5th, 2010 in Game Development

It won't even work if I simply do

var pushedButton:Number;

function keyz(event:KeyboardEvent){
	if(event.keyCode==65){
		pushedButton=1;
}
		}
		
stage.addEventListener(KeyboardEvent.KEY_DOWN , keyz);

Why?

At 4/5/10 02:02 PM, milchreis wrote: typed variables
typed functions
semicolons
switch statements

use them, love them

The variable is typed, the semicolons are there, not sure what you mean by typed functions and switch statements? I tried using else by the way... But the problem is that the flash just wont even listen to my keyboard

Sorry if I'm being dumb

Response to: Slow Flash In Firefox Posted April 5th, 2010 in Game Development

Some mozilla ad-dons could be slowing down the performance... Try updating your mozilla version to the newest one and also do the same with your flash player (but I doubt that is the reason of the lag)

Response to: Generating Enemies Posted April 5th, 2010 in Game Development

do trace(enemyCount + ", " + maxEnemyCount + ", " +enemyInc);
instead of trace(enemyCount, maxEnemyCount, enemyInc);

trace is a command that shows something in an output window, it's a very handy dev tool for debugging, you can use it to check variables, coordinates, existence of smth, etc.

KeyboardEvent Posted April 5th, 2010 in Game Development

I know I know, I ask A LOT of questions. But anyway:

var pushedButton=1

function keyz(event:KeyboardEvent){
	if(event.keyCode==65){
		pushedButton=1}
	if(event.keyCode==83){
		pushedButton=2}
	if(event.keyCode==68){
		pushedButton=3}
	if(event.keyCode==70){
		pushedButton=4}
		
		}
		
stage.addEventListener(KeyboardEvent.KEY_DOWN , keyz);

This doesn't work for some reason. The pushedButton var does not change. Does anyone know why?

Response to: Instance names as3 Posted April 5th, 2010 in Game Development

At 4/5/10 09:33 AM, BasV wrote:
At 4/5/10 09:18 AM, xKiRiLLx wrote: I have 3 objects on the stage, smil0, smil1 and smil2

for (u=0; u<3; u++){
trace(###.x);
}
for (u=0; u<3; u++){
trace(this["smil" + u].x);
}

But I wouldn't recommend this method of doing it, it isn't neat. You should create these instances in your class manually and store them in an Array or Vector.

They are going to be stored in an Array, but I don't want to create them manually, so I'm going to use this. This would take much much less symbols ;) Thanks

Instance names as3 Posted April 5th, 2010 in Game Development

I have 3 objects on the stage, smil0, smil1 and smil2

for (u=0; u<3; u++){
trace(###.x);
}

### should be "smil"+u, so it would be smil0, smil1 and smil2

But I don't know what to write in the ### place :|

Response to: Cannot import MP3s Posted April 4th, 2010 in Game Development

Try compiling them in a program like Audacity and try importing then

Response to: Accessing an array from class Posted April 4th, 2010 in Game Development

At 4/4/10 03:02 PM, zrb wrote: You need to pass the Timeline to your class so you can access the timeline's properties and methods OR if your using a document class because your document class is your timeline.

Example, on your timeline:

var nextBubbles:Array = [];
var myClass:MyClassName = new MyClassName();
myClass.mainStage = this;

You could have a property "mainStage" in the class your writing and in the private function you could do this:

this.gotoAndStop(mainStage.nextBubbles[0 ]);

Be sure to make mainStage a public property so your timeline can access it.

It says:

1119: Access of possibly undefined property mainStage through a reference with static type Class.

What I've done is I wrote in the class:

public var mainStage

And on the timeline:

cl_ball_cursor.mainStage = this;

What did I do wrong?

P.S. The array is already set, and cl_ball_cursor is a MovieClip class, if that matters

Response to: Accessing an array from class Posted April 4th, 2010 in Game Development

At 4/4/10 03:03 PM, xKiRiLLx wrote: Thanks, but that doesn't work, because I forgot to say that I'm using AS3.

I addressed that to the guy who suggested _root, but didn't see the responses after that, lol.
Thanks, i'm going to try it out now.

Response to: Accessing an array from class Posted April 4th, 2010 in Game Development

Thanks, but that doesn't work, because I forgot to say that I'm using AS3.


Another stupid question from me. Say, I have a class and I have an array nextBubbles on the timeline.
In one of the class private functions (methods they are called, right?) I'm trying to do:

this.gotoAndStop(nextBubbles[0]);

But it won't let me because there's no such var in that class. So, how do I make it access the var from the stage?

Response to: I'm making a score counter... Posted April 4th, 2010 in Game Development

Well, you could make it so...

var yourScore
var showScore

if(yourScore<10){
showScore="000000000"+yourScore}else
if(yourScore<100){
showScore="00000000"+yourScore}else
if(yourScore<1000){
showScore="0000000"+yourScore}

etc...?

Response to: Quick AS3 question Posted April 4th, 2010 in Game Development

At 4/4/10 01:48 PM, zrb wrote:

Thank you, works.

Response to: Question regarding audio sync Posted April 4th, 2010 in Game Development

Is the sync set to Stream?

Response to: Quick AS3 question Posted April 4th, 2010 in Game Development

Tried using that code, you gave me, here's what it says

TypeError: Error #1006: addEventListener is not a function
at MethodInfo-221()
at flash.display::Sprite/constructChildren(
)
at flash.display::Sprite()
at flash.display::MovieClip()
at minig_fla::MainTimeline()

Response to: Quick AS3 question Posted April 4th, 2010 in Game Development

Thanks a lot everyone! Now this is much clearer ;)

Response to: As3? Posted April 4th, 2010 in Game Development

At 4/4/10 12:27 PM, henke37 wrote: Both platform games and pacman requires physics. Sorry, but anything more advanced than pong will require some form of physics.

I assume he meant more complicated physics like the ones you see in Box2D powered games.

On topic, there are a lot of AS3 books to choose from, but if you want to focus on game development, you might want to look at this (first thing that came up when searching) Link right here

But I didn't use a book, so I can't really recommend.

Response to: Quick AS3 question Posted April 4th, 2010 in Game Development

Found my way around by using startDrag. But i'd like to understand what you've said about the ADDED_TO_STAGE thing... So could you please explain that to me ;)

Response to: Quick AS3 question Posted April 4th, 2010 in Game Development

I'm lost now. Can you explain what to do exactly please? I tried putting an ENTER_FRAME listener for the mouse to move into a function which is called by ADDED_TO_STAGE and it still gives me the error...

Response to: Quick AS3 question Posted April 4th, 2010 in Game Development

At 4/4/10 09:43 AM, BasV wrote:
At 4/4/10 09:00 AM, xKiRiLLx wrote: I've found out that I can fix this problem by taking away the stage. in front of mouseX and mouseY in the mover function, but then the cursor behaves differently and isn't a cursor anymore!

Any help appreciated, thanks.
stage is only avaiable after the object has been added to the display list, before that it will be null which will result in an Error.

Your argument 'Event' Does not make sense - in this way, you've defined an variable called 'Event' of type Object. You'll want something like : e:Event, which declares 'e' of type 'Event'.
private function mover(e:Event):void{
this.x = stage.mouseX
this.y = stage.mouseY
this.mouseEnabled = false
this.mouseChildren = false
}

It still gives me the same error...

Response to: Quick AS3 question Posted April 4th, 2010 in Game Development

Anyone?