00:00
00:00
Newgrounds Background Image Theme

JalenBrah just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Foss: Bottles Of Beer

2,042 Views | 23 Replies
New Topic Respond to this Topic

Foss: Bottles Of Beer 2005-12-21 21:29:45


Ever wanted to write out the whole bottles of beer song?
Can't be bothered though, can you?
Well, i've made a code, for all you lazy people so you can sing it all day, and not have to remember the lyrics.

songpart1 = " bottles of beer on the wall.";
songpart2 = " bottles of beer.";
songpart3 = "Take one down and pass it around,";
trace(99+songpart1);
trace(99+songpart2);
for (x=98; x>=1; x--) {
trace(songpart3);
if (x<2) {songpart1 = " bottle of beer on the wall.";}
trace(x+songpart1);
trace("");
trace(x+songpart1);
if (x<2) {songpart2 = " bottle of beer.";}
trace(x+songpart2);
}
songpart1 = " bottles of beer on the wall.";
songpart2 = " bottles of beer.";
trace(songpart3);
trace("No more"+songpart1);
trace("");
trace("No more"+songpart1);
trace("No more"+songpart2);
trace("Go to the store and buy some more,");
trace("99"+songpart1);

Just some fun on AS (Yes, that's not a joke).


SIG YOINK!

BBS Signature

Response to Foss: Bottles Of Beer 2005-12-21 21:31:09


EL OH EL. OMG James, this thing is hilarious! Great job!

Response to Foss: Bottles Of Beer 2005-12-21 21:32:38


Thats some great code JPI :D

Beer!

Foss: Bottles Of Beer

Response to Foss: Bottles Of Beer 2005-12-21 21:35:18


Thanks, i love BEER!
Oh, and before i forget

FOSS: Main

Foss: Bottles Of Beer


SIG YOINK!

BBS Signature

Response to Foss: Bottles Of Beer 2005-12-21 21:39:12


At 12/21/05 09:32 PM, Christmas-Neashir wrote: Thats some great code JPI :D

Beer!

that pic is so sexy.

Response to Foss: Bottles Of Beer 2005-12-21 21:43:45


OK, just so you know, there is a cult of this stuff, and i've just posted my code :D
There are trying to get the 99 bottes of beer song, done in any programming language!
http://www.99-bottles-of-beer.net/

Oh, and i'm keeping count, right now, i'm on my 7th beer!

That's what inspired me

Foss: Bottles Of Beer


SIG YOINK!

BBS Signature

Response to Foss: Bottles Of Beer 2005-12-21 21:57:51


for(i=0;i<=99;++i){
i >= alchoholLimit ? passOut():drinkBeer();
}

Response to Foss: Bottles Of Beer 2005-12-22 07:39:20


A bump or -Liam- to see if i can make FOSS: Main :D

Foss: Bottles Of Beer


SIG YOINK!

BBS Signature

Response to Foss: Bottles Of Beer 2005-12-22 07:52:09


At 12/22/05 07:39 AM, James_Prankard_Inc wrote: A bump or -Liam- to see if i can make FOSS: Main :D

Roffle, ok.

var song:Array = [" bottles of beer on the wall.", " bottles of beer.", "Take one down and pass it around,"];
trace(99+song[0]+"\n"+99+song[1]);
for (x=98; x>=1; x--) {
trace(song[2]);
x<2 ? (song[0]=" bottle of beer on the wall.", song[1]=" bottle of beer.") : 0;
trace(x+song[0]+"\n\n"+x+song[0]);
trace(x+song[1]);
}
song[0] = " bottles of beer on the wall.";
song[1] = " bottles of beer.";
trace(song[2]+"\nNo more"+song[0]+"\n\nNo more"+song[0]+"\nNo more"+song[1]+"\nGo to the store and buy some more,\n99"+song[0]);


Sup, bitches :)

BBS Signature

Response to Foss: Bottles Of Beer 2005-12-22 07:55:54


Bah, I was almost finished with making a beer bottle in APIT, but then I accidentally deleted everything. There goes 10 minutes of work, and no API beer for you. >=(


BBS Signature

Response to Foss: Bottles Of Beer 2005-12-22 08:24:34


At 12/22/05 07:55 AM, Santazien wrote: Bah, I was almost finished with making a beer bottle in APIT, but then I accidentally deleted everything. There goes 10 minutes of work, and no API beer for you. >=(

Nah, i've already got API beer ;)

Code by Atom300
for(_root.i=0;_root.i<99;_root.i++) {
createEmptyMovieClip( "br"+_root.i, _root.i );
tellTarget("br"+_root.i) {
lineStyle( 1, 0, 50);
moveTo(0, 0);
lineTo(0,-10);
lineTo(-5,-15);
lineTo(-5,-20);
lineTo(-10,-20);
lineTo(-10,-15);
lineTo(-15,-10);
lineTo(-15,0);
lineTo(0,0);
createTextfield("t",1,-15,0,90,30);
t.text=_root.i+1;
_x=50+_root.i%20*25;
_y=50+(Math.floor(_root.i/20))*50;
}
}
x=99;
setInterval(
function(){
x--;
if(x+1>0)tellTarget("br"+x)_alpha=0;
}
,
100
);


SIG YOINK!

BBS Signature

Response to Foss: Bottles Of Beer 2005-12-22 08:28:47


At 12/22/05 08:24 AM, James_Prankard_Inc wrote: Nah, i've already got API beer ;)

Mine looked much tastier =(

Code by Atom300

Omg tellTarget.


BBS Signature

Response to Foss: Bottles Of Beer 2005-12-22 08:38:22


At 12/22/05 08:24 AM, James_Prankard_Inc wrote: Nah, i've already got API beer ;)

=O

You got that from here ;D


Sup, bitches :)

BBS Signature

Response to Foss: Bottles Of Beer 2005-12-22 08:59:54


What the heck, the flash forum was slow so I decided to give the api beer another shot. Here's how it turned out:

//Shape 1
lineStyle(1, 0x000000, 100);
beginFill(0x9D600B, 100);
moveTo(-10, -92);
lineTo(10, -92);
lineTo(12, -52);
curveTo(14, -38, 20, -22);
curveTo(30, -5, 30, 48);
lineTo(30, 88);
curveTo(30, 98, 20, 98);
lineTo(-20, 98);
curveTo(-30, 98, -30, 88);
lineTo(-30, 48);
curveTo(-30, -5, -20, -22);
curveTo(-14, -38, -13, -52);
lineTo(-10, -92);
endFill();
//Shape 2
lineStyle(1, 0x000000, 100);
beginFill(0x9D600B, 100);
moveTo(-10, -92);
lineTo(10, -92);
curveTo(12, -95, 9, -99);
lineTo(-9, -99);
curveTo(-12, -95, -10, -92);
endFill();
//Shape 3
lineStyle(1, 0x000000, 100);
beginFill(0xC8CBD8, 100);
moveTo(0, -96);
lineTo(2, -93);
lineTo(4, -96);
lineTo(6, -93);
lineTo(8, -96);
lineTo(10, -93);
curveTo(16, -98, 10, -101);
lineTo(-10, -101);
curveTo(-16, -98, -10, -93);
lineTo(-8, -96);
lineTo(-6, -93);
lineTo(-4, -96);
lineTo(-2, -93);
lineTo(0, -96);
endFill();
//Shape 4
lineStyle(1, 0x000000, 100);
beginFill(0x4ECD13, 100);
moveTo(0, 0);
lineTo(27, 0);
curveTo(31, 25, 30, 66);
lineTo(0, 66);
lineTo(0, 0);
endFill();
//Shape 5
lineStyle(1, 0x000000, 100);
beginFill(0xFFFFFF, 100);
moveTo(3, 3);
lineTo(27, 3);
curveTo(31, 20, 30, 63);
lineTo(3, 63);
lineTo(3, 3);
endFill();
//Shape 6
lineStyle(1, 0x000000, 0);
beginFill(0xEEC472, 100);
moveTo(-10, -48);
curveTo(-13, -26, -18, -19);
curveTo(-18, -13, -11, -16);
curveTo(-3, -20, -5, -48);
curveTo(-9, -71, -10, -48);
endFill();


BBS Signature

Response to Foss: Bottles Of Beer 2005-12-22 09:13:56


thats sexy man. Haha great job.

Response to Foss: Bottles Of Beer 2005-12-22 10:29:39


better
var drunk:Number = 99
while(drunk>1) {
trace("" +drunk+ "bottles of beer on the wall,"newline""+drunk+"bottles of beer!"newline"Take one down, pass it around"newline);
drunk--
trace(""+drunk+"bottles of beer on the wall!"newline);
}

Response to Foss: Bottles Of Beer 2005-12-22 10:32:18


thanks for this useless yet so useful tool

wut

same concept could be used for a bunch of other things too

XD


WEBSITE

BLOG ~ Dont fuck around with my dog. All that I can see I steal. ~

NG FFR ~ Automatic for the people.

BBS Signature

Response to Foss: Bottles Of Beer 2005-12-22 10:33:50


//2nd part

//after the "}"
trace("1 more bottle of beer on the wall,1 more bottle of beer!"newline);
trace("Take it down, pass it around"newline);
trace("No more bottles of beer on the wall!"newline);
trace("No more bottles of beer on the wall"newline"No more bottles of beer!"newline
"Go to the store, buy some more,"newline" 99 bottles of beer on the wall!"newline")
/* Note:It might be better if every part of the song had it's own trace statement, but I dont really know */

Response to Foss: Bottles Of Beer 2005-12-22 10:37:24


Okay wait that doesint work, here is what I got:
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 3: ')' or ',' expected
trace(drunk+ "bottles of beer on the wall,"newline""+drunk+"bottles of beer!"newline"Take one down, pass it around"newline);

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 5: ')' or ',' expected
trace(drunk+"bottles of beer on the wall!"newline);

Total ActionScript Errors: 2 Reported Errors: 2

Response to Foss: Bottles Of Beer 2005-12-22 10:42:33


At 12/22/05 10:37 AM, GameCubeFreak2004 wrote: Okay wait that doesint work, here is what I got:

*sigh*

Test your code before posting =\

var drunk:Number = 99;
while (drunk>1) {
trace(""+drunk+" bottles of beer on the wall,\n"+drunk+" bottles of beer!\nTake one down, pass it around\n");
drunk--;
trace(""+drunk+" bottles of beer on the wall!\n");
}
trace("1 more bottle of beer on the wall, 1 more bottle of beer!\nTake it down, pass it around\nNo more bottles of beer on the wall!\n\nNo more bottles of beer on the wall\nNo more bottles of beer!\nGo to the store, buy some more,\n99 bottles of beer on the wall!");


Sup, bitches :)

BBS Signature

Response to Foss: Bottles Of Beer 2005-12-22 10:46:39


heh I didnt know "\n" was supported in AS.

Using -Christmas-'s corrected script I got this in the trace window:

99 bottles of beer on the wall,
99 bottles of beer!
Take one down, pass it around

98 bottles of beer on the wall!

98 bottles of beer on the wall,
98 bottles of beer!
Take one down, pass it around

97 bottles of beer on the wall!

97 bottles of beer on the wall,
97 bottles of beer!
Take one down, pass it around

96 bottles of beer on the wall!

96 bottles of beer on the wall,
96 bottles of beer!
Take one down, pass it around

95 bottles of beer on the wall!

95 bottles of beer on the wall,
95 bottles of beer!
Take one down, pass it around

94 bottles of beer on the wall!

94 bottles of beer on the wall,
94 bottles of beer!
Take one down, pass it around

93 bottles of beer on the wall!

93 bottles of beer on the wall,
93 bottles of beer!
Take one down, pass it around

92 bottles of beer on the wall!

92 bottles of beer on the wall,
92 bottles of beer!
Take one down, pass it around

91 bottles of beer on the wall!

91 bottles of beer on the wall,
91 bottles of beer!
Take one down, pass it around

90 bottles of beer on the wall!

90 bottles of beer on the wall,
90 bottles of beer!
Take one down, pass it around

89 bottles of beer on the wall!

And so on...

Response to Foss: Bottles Of Beer 2005-12-22 10:50:07


At 12/22/05 10:46 AM, GameCubeFreak2004 wrote: Using -Christmas-'s corrected script I got this in the trace window:

The full output can be found here =P


Sup, bitches :)

BBS Signature

Response to Foss: Bottles Of Beer 2005-12-22 11:00:29


C++ Version, writes the whole song to a .txt file ;)

If only you could do that with Flash =(


Sup, bitches :)

BBS Signature

Response to Foss: Bottles Of Beer 2005-12-22 11:36:45


At 12/22/05 08:28 AM, Santazien wrote:
At 12/22/05 08:24 AM, James_Prankard_Inc wrote: Nah, i've already got API beer ;)
Mine looked much tastier =(

Having seen it, it is a look sexier too!

At 12/22/05 10:42 AM, -Christmas- wrote:
At 12/22/05 10:37 AM, GameCubeFreak2004 wrote: Okay wait that doesint work, here is what I got:
*sigh*

Test your code before posting =\

I prefered the previous version, this has the "1 bottles of beer" glitch :O

Hey, i think i just continued a cult :D


SIG YOINK!

BBS Signature