Be a Supporter!
Response to: happy birthday glaiel-gamer Posted June 8th, 2009 in Game Development

Who what when where how why now?

hapy burfdai tyler
if'n(isBirthday){GETDRUNK();}
Response to: lalala ActionScript 2.0 Posted June 8th, 2009 in Game Development

Find the bit of code that checks for floor contact, if it comes back as true then move the character upwards by enough to make him stand on the surface.

Response to: Attn: Flash Forum Posted May 19th, 2009 in Game Development

At 5/19/09 06:01 PM, KaynSlamdyke wrote:
At 5/19/09 05:04 PM, Glaiel-Gamer wrote: One thing I do is give solutions in psuedo-code or faux-c++ or just type some AS in the "post reply" box without testing.

So the logic is there, but if people want to make it work they have to understand what it does.
Yeah. I've done that a few times.
But then the reply is immediately "So how do I do that in AS?" from the half of the people who aren't here to learn.

It's not that they aren't here to learn, it's that they have no coding experience, so don't have a clue how to go about tackling a problem. I firmly believe that the best way to help new Flash coders is to simply solve their problem, in AS. Yes, they may just copy/paste it into their fla, but as I said above, they're either gonna have to learn to adapt it in order to make a unique game, or they're just going to get a hell of a lot of 'you copied xxxxx' reviews.

By posting an answer in another language or using pseudocode, you're automatically making the assumption that the OP has some kind of clue about scripting or coding. Which is naive, considering that many, MANY users only learn to code by starting with AS. Some have a natural affinity with loops, classes, if...elses, listeners, etc etc. But many simply do not have a clue about the logical aspect of coding, or even the syntax. There's really no shame in actually fixing a user's code/fla, giving them the working code, and moving on. I personally would really like to see more of the experienced users do exactly that.

Never assume that the newbs have even a fraction of the skills you had when you STARTED with Flash, let alone those you have now after years of using it.

Response to: Attn: Flash Forum Posted May 18th, 2009 in Game Development

The original point of AS: Main was to provide answers to the most regularly asked questions - to help prevent the tedium of writing the same thing out over and over again. Obviously things have moved on since then, but there are still a lot of people using AS2, and those links are still useful (and of course AS3: Main) - but I never see people using them to help newbs.

Although linking them to the main topic is useful, it's definitely better to grab the URL of the specific tut that deals with their problem - it can be a bit of a trial for new internet users finding the one they need.

In terms of specific AS questions that aren't covered by the AS: Main threads, I personally actually quite enjoy spending 10 minutes solving problems with users' flas or code, I just wish I had more time to dedicate doing it because it can actually prompt me to try things I haven't.

Myself, I learnt partly by copying (from web samples or decompiling), understanding and adapting other Flashers' codes, and while I'm aware there are some who won't even attempt to understand why the code they copied from the internet won't work, it certainly shouldn't be looked down on as much as it is as a way for users to learn.

In general, new Flash users should be treated with tolerance rather than hostility. So they tried to create a game by copying someone else's work... who cares? If they want their game to be unique, they're going to have to learn how to understand AS. There is no place on the Flash forum for the virtual bullying and insulting I've seen in some instances, more often than not by posters who don't have a clue themselves.

The Flash forum is here for the experienced users to help the less experienced, whether it be in the artistic or the coding side of the program. We were all newbs once, some people would do well to remember that and chill out on the abuse. If you think you might have an answer to a question, then post... if you're just going to flame, be aggressive, or give bad guidance... don't bother.

Response to: Circle Text in flash. Posted May 18th, 2009 in Game Development

At 5/18/09 02:20 PM, Dereks wrote: Hmm is there a way to do it using AS ?

Yes.

txt="GUMBOOT MOFO ";														//TEXT TO DISPLAY
circRad=200;																			//RADIUS OF CIRCLE

function CREATECIRCLE(str){												//CREATE CIRCLE
	letterAngle=360/(str.length);												//GRAB ANGLE OF LETTERS
	txtArr=str.split("");															//CONVERT TEXT TO ARRAY
	var c=createEmptyMovieClip("circ",1);								//NEW MC
	c._x=Stage.width/2;c._y=Stage.height/2;							//PLACE CENTRALLY
	var ang=-90;																	//ANGLE OF FIRST LETTER
	for(var i=0;i<txtArr.length;i++){										//LOOP LETTER ARRAY
		var nl=c.attachMovie("letter","l"+i,i);								//CREATE NEW LETTER MC
		nl.t=txtArr[i];																//SET LETTER
		nl._rotation=ang+90;													//SET ROTATION
		nl._x=Math.cos(TRAD(ang))*circRad;							//SET X BASED ON ROTATION/RADIUS
		nl._y=Math.sin(TRAD(ang))*circRad;							//SET Y BASED ON ROTATION/RADIUS
		ang+=letterAngle;															//INCREMENT THE ANGLE
	}																						//
	c.onEnterFrame=function(){this._rotation+=5;}					//ROTATE HOLDER MC
}

function TRAD(xxx){return(xxx*Math.PI/180);} 					//FUNCTION: DEGREES TO RADIANS

CREATECIRCLE(txt);															//DO THE FUNKY THANG
Response to: Projectile coding. Posted May 15th, 2009 in Game Development

Change

_root.player.attachMovie

to

_root.attachMovie

Response to: Change AS@ to get snow to go up? Posted May 15th, 2009 in Game Development

var counter:Number = 0;
raindrop.onEnterFrame = function() {
	if (this._y>0) {
		this._y -= 30;
	} else {
		clone();
	}
};
function clone() {
	if (counter<150) {
		var dx:Number = random(500);
		var dy:Number = random(200);
		var myObject = new Object();
		myObject._x = dx;
		myObject._y = dy+Stage.height;
		myObject._alpha = random(100);
		myObject._xscale = 50+myObject._alpha;
		myObject._yscale = myObject._xscale;
		myObject.onEnterFrame = function() {
			if (this._y>0) {
				this._y -= this._alpha/10;
			} else {
				this._y += 348+Math.floor(Math.random()*348);
				this._x = Math.floor(Math.random()*444);
			}
		};
		raindrop.duplicateMovieClip("nr"+counter, this.getNextHighestDepth(), myObject);
		counter += 1;
	}
}
Response to: Flash Feature Request Posted May 13th, 2009 in Game Development

Ability to edit the AS window without having to close the find/replace dialogue first.
Annoys the hell out of me

Response to: Dynamic volume sound?(AS2) Posted May 11th, 2009 in Game Development

At 5/11/09 03:19 AM, Denvish wrote: You should then be able to use SFXA.setVolume(0); and SFXB.setVolume(0); to adjust each sound

In terms of fading in or out, something like this should work:

function FADEMUSIC(snd,io){																	//SOUND, INOUT
	clearInterval(fm);																					//CLEAR INTERVAL
	if(io){																									//FADE IN	
		fm=setInterval(function(){																	//INTERVAL
			if(snd.getVolume()<100){																//NOT TOO LOUD
				snd.setVolume(snd.getVolume()+1);											//VOLUME UP
			}else{																							//ENOUGH
				snd.setVolume(100);clearInterval(fm);										//CLEAR
			}																									//
		},100);																								//MS
	}else{																									//FADE OUT										
		fm=setInterval(function(){																	//INTERVAL
			if(snd.getVolume()>0){																	//STILL GOING DOWN
				snd.setVolume(snd.getVolume()-2);											//DOWN
			}else{																							//ZERO
				snd.setVolume(0);clearInterval(fm);											//CLEAR
			}																									//
		},100);																								//MS
	}																											//
}																												//

The snd parameter for the function in this case would be either SFXA or SFXB, and the io would be either 1 (fade in) or 0 (fade out). For example, to fade in sound1:

_root.FADEMUSIC(SFXA,1);
Response to: Dynamic volume sound?(AS2) Posted May 11th, 2009 in Game Development

When you attach each sound, you need to attach it to a new Movieclip if you want to be able to adjust its volume/pan independently of other sounds.

createEmptyMovieClip("SA",_root.getNextHighestDepth());
SFXA=new Sound(SA);
SFXA.attachSound("sound1");
createEmptyMovieClip("SB",_root.getNextHighestDepth());
SFXB=new Sound(SB);
SFXB.attachSound("sound2");

You should then be able to use SFXA.setVolume(0); and SFXB.setVolume(0); to adjust each sound

Response to: halp??? plz Posted May 6th, 2009 in Game Development

30-day trial of Adobe Flash is here

Locking this topic now because any discussion beyond this is likely to end up about piracy, which is a bannable offence.

Response to: nextFrame() Posted May 6th, 2009 in Game Development

At 5/6/09 01:58 AM, Klemzo wrote: No it doesn't work. I dunno like its something wrong. If I put a button into a movie clip it doesn't work at all...
But if I put it seperetly and pit that script in it works but It still doesn't put you where I want. It puts you to scene 1, 1st frame! WTF is that :(
The script clearly says:
on(release){
gotoAndPlay("Scene 2", #);
}

(I put number where # is afcourse)

So whats the problem?
THanks~

I've had this problem with buttons inside MCs/Scenes before. The solution I used was to have a function on the root timeline, first frame:

function GOTOIT(fr){
	gotoAndPlay("Scene 2",fr);
}

Then add this to the button instead:

on(release){
	_root.GOTOIT(1);
}
Response to: deleting multiple duplicated MC's Posted May 6th, 2009 in Game Development

At 5/6/09 12:08 AM, farfenwaffle wrote: -whats the proper use for: _root.[movieclip].deleteMovieClip to make all of the spawned enemys go away?
for (i = 1; i<nrEnemies; i++){
	_root["Enemy" + i].removeMovieClip();
}
-what the heck does my code mean?

This is a FOR loop that runs repeatedly.

It will start looping from the point where i (a counter) =1.

for (i = 1;

It will stop looping when i stops being less than max number of enemies (variable: nrEnemies).

i<nrEnemies;

Every loop, i will be incremented by one

i++){

Everything that's inside the curly brackets is the code that will be executed each loop - in the case of your code, it duplicates a new enemy on each loop.

for (i = 1; i<nrEnemies; i++){
//DO STUFF
}
-should I ever do something stupid like this ever again?

You should check out the Flash help files (press F1 in Flash) and maybe AS: Main if you're keen on learning how to code games.

Response to: Can you draw a StickFigure? Posted April 10th, 2009 in Game Development

Happy happy joy joy joy

Can you draw a StickFigure?

Response to: X and Y help Posted April 10th, 2009 in Game Development

Not too sure, but can't you just add or subtract the vcam _x or _y from the spawn point? That seems like it should place them at the correct positions

Response to: Noob Question! Posted April 10th, 2009 in Game Development

At 4/10/09 10:03 AM, Kirk-Cocaine wrote:
At 4/10/09 09:52 AM, 4urentertainment wrote: I may not know AS3, but I know that that was AS3.
No it was AS2.

Aye, AS2 does have some listener capabilities, just not as extensive or necessary as AS3. Most people seem to prefer to use an enterFrame Key.isDown check, but the Key.Listener is definitely a better method in some (most?) cases.

Response to: Noob Question! Posted April 10th, 2009 in Game Development

At 4/10/09 08:34 AM, Spikedit wrote: Thanks guys, what are the key numbes for "p" and "ctrl"? (like A is 65)

http://denvish.net/images/keycode/

Response to: Noob Question! Posted April 10th, 2009 in Game Development

Put this code on frame 5:

kl=new Object();
kl.onKeyDown=function(){
	if(Key.getCode()==65){
		gotoAndStop(6);
		Key.removeListener(kl);
	}
}
Key.addListener(kl);

stop();
Response to: Photoshop Obama 'Balling' Posted April 8th, 2009 in General

At 4/8/09 08:32 AM, Rig wrote: SCREW YOU ALL

Promises, promises

Response to: flash audio reading problem Posted April 7th, 2009 in Game Development

If you're importing mp3, it needs to be 44.1 KHz and I believe at least 16bit
You should be able to change this in the File>Save As dialogue in Audacity

Response to: Explain Code Please (7 Lines) Posted April 7th, 2009 in Game Development

Senocular's explanation is a fairly good one

Response to: Collab: The world Posted April 7th, 2009 in Game Development

At 4/7/09 12:39 AM, AlexisGOAR wrote: oooo sorry

No worries, it's nothing personal, just necessary to prevent the Flash forum being overrun by collab threads

http://www.newgrounds.com/bbs/topic/9105 59

Response to: Letter Key Codes!! Posted April 7th, 2009 in Game Development

Womble McFurtle

Response to: is a sound playing?? Posted April 6th, 2009 in Game Development

Look up onSoundComplete in the Flash help files

onSoundComplete = function() {}

Invoked automatically when a sound finishes playing. You can use this handler to trigger events in a SWF file when a sound finishes playing.

Sound.duration and Sound.position might also be useful to you

Response to: [AS2] How to correctly zoom... Posted April 6th, 2009 in Game Development

At 4/6/09 03:58 AM, CinisterGames wrote: How do you just make your crosshair zoom in so it wont seem blank??

Clarify please, not sure exactly what you're asking

Response to: Newgrounds Medals - Games and Tips Posted April 2nd, 2009 in Where is / How to?

Posting a list of games currently with medals here, for easy reference

Games with medals (maintained by Wylo)

Response to: awkward conversation Posted March 31st, 2009 in General

Of course, the correct answer given the situation would've been 'That's OK, I'm gay'

Response to: Ask me what's radioactive at school Posted March 31st, 2009 in General

At 3/31/09 09:13 AM, ResidentOEvil wrote: Ok, about 1 hour til' school.

What do you think has a little radiation for me to find

Wind-up clocks/watches with luminous paint

Response to: awkward conversation Posted March 31st, 2009 in General

Maybe she was just saying that married life doesn't include excitement