Forum Topic: As3 Code Collab! Line By Line.

(1,800 views • 55 replies)

This topic is 2 pages long. [ 1 | 2 ]

<< < > >>
None

deadlock32

Reply To Post Reply & Quote

Posted at: 9/8/08 07:33 PM

deadlock32 NEUTRAL LEVEL 18

Sign-Up: 04/28/01

Posts: 2,502

I just got an idea though I am unsure of how well this will work. Might as well try.

So how bout a thread that just creates some large scale program. something that could be copied into the first frame of a flash cs3 time line and compiled. Assume no library graphics.

I think 10 lines max per post:
Use the rules from 25Lines.com on what a line is.

Try not to significantly alter existing code, but you can add to others functions and such. Please either use good coding practices or comments for WHY instead of HOW

finally, copy and paste the total commented project in your post, so its easy to for the next person to add to the IDE.

Maybe by the end we'll have something submitable to the portal... keep an eye out for people who submit it early ^_^

Here is the starting block.

const CIRCLE_RADIUS_MIN:int = 25;
const CIRCLE_RADIUS_MAX:int = 50;
const CIRCLE_CREATION_DELAY:int = 500;

var circleCreationTimer:Timer = new Timer(CIRCLE_CREATION_DELAY, 0);
circleCreationTimer.addEventListener(TimerEvent.TIMER, createCircleEvent);
circleCreationTimer.start();

function createCircleEvent(timerEvent:TimerEvent):void
{
	var newCircle:Sprite = createCircleSprite();
	
	newCircle.x = Math.random()*(stage.stageWidth - newCircle.width);
	newCircle.y = Math.random()*(stage.stageHeight - newCircle.height);
	addChild(newCircle);
}

function createCircleSprite():Sprite
{
	var radius:int = CIRCLE_RADIUS_MIN + Math.random()*(CIRCLE_RADIUS_MAX - CIRCLE_RADIUS_MIN);
	var tempCircle:Sprite = new Sprite();

	tempCircle.graphics.lineStyle();
	tempCircle.graphics.beginFill(Math.random()*0xFFFFFF);
	tempCircle.graphics.drawCircle(radius/2, radius/2, radius);
	tempCircle.graphics.endFill();

	return tempCircle;
}
if this doesnt work out well... the rules may need tweeking then. ^_~

As3 Code Collab! Line By Line.


None

xXxAlecxXx

Reply To Post Reply & Quote

Posted at: 9/11/08 03:20 PM

xXxAlecxXx NEUTRAL LEVEL 14

Sign-Up: 11/17/06

Posts: 1,722

Awesome idea too bad i suck at coding hahaha


None

PrettyMuchBryce

Reply To Post Reply & Quote

Posted at: 9/11/08 04:33 PM

PrettyMuchBryce LIGHT LEVEL 06

Sign-Up: 03/17/01

Posts: 1,341

I love this idea but I'm a messy coder. Maybe you can help me clean up what I submit.


None

Ben-Fox

Reply To Post Reply & Quote

Posted at: 9/11/08 04:36 PM

Ben-Fox LIGHT LEVEL 07

Sign-Up: 12/27/03

Posts: 571

Now this looks like it could be fun. Here's a function to grab a circle (or whatever else is added to the stage) at random for other possible manipulations

function getRandomChild():DisplayObject { //DisplayObject class chosen for maximum compatibility
  var ind:uint = Math.floor(Math.random() * numChildren);
  return getChildAt(ind);
  //Remember to cast the return value of this function to the appropriate type!
}

Which places the total project at:

const CIRCLE_RADIUS_MIN:int = 25;
const CIRCLE_RADIUS_MAX:int = 50;
const CIRCLE_CREATION_DELAY:int = 500;

var circleCreationTimer:Timer = new Timer(CIRCLE_CREATION_DELAY, 0);
circleCreationTimer.addEventListener(TimerEvent.TIMER, createCircleEvent);
circleCreationTimer.start();

function createCircleEvent(timerEvent:TimerEvent):void
{
	var newCircle:Sprite = createCircleSprite();
	
	newCircle.x = Math.random()*(stage.stageWidth - newCircle.width);
	newCircle.y = Math.random()*(stage.stageHeight - newCircle.height);
	addChild(newCircle);
}

function createCircleSprite():Sprite
{
	var radius:int = CIRCLE_RADIUS_MIN + Math.random()*(CIRCLE_RADIUS_MAX - CIRCLE_RADIUS_MIN);
	var tempCircle:Sprite = new Sprite();

	tempCircle.graphics.lineStyle();
	tempCircle.graphics.beginFill(Math.random()*0xFFFFFF);
	tempCircle.graphics.drawCircle(radius/2, radius/2, radius);
	tempCircle.graphics.endFill();

	return tempCircle;
}
function getRandomChild():DisplayObject { //DisplayObject class chosen for maximum compatibility
  var ind:uint = Math.floor(Math.random() * numChildren);
  return getChildAt(ind);
  //Remember to cast the return value of this function to the appropriate type!
}

None

PrettyMuchBryce

Reply To Post Reply & Quote

Posted at: 9/11/08 04:57 PM

PrettyMuchBryce LIGHT LEVEL 06

Sign-Up: 03/17/01

Posts: 1,341

I made it so the circles descend and are created above the stage. However, I think I voided the previous posters function by putting the circles in an array. I kept it in there anyways though. If there is a way to make this more efficient please tell me. This is a learning exercise for me.

stage.frameRate = 30;
const CIRCLE_RADIUS_MIN:int = 25;
const CIRCLE_RADIUS_MAX:int = 50;
const CIRCLE_SPD:int = 7;
const CIRCLE_CREATION_DELAY:int = 500;
var maxCircles:int = 50;
var circles:Array = new Array(); //lets make a container so we can easily access the circles?

var circleCreationTimer:Timer = new Timer(CIRCLE_CREATION_DELAY, 0);
circleCreationTimer.addEventListener(TimerEvent.TIMER, createCircleEvent);
circleCreationTimer.start();
addEventListener(Event.ENTER_FRAME,onEnterFrame);

function createCircleEvent(timerEvent:TimerEvent):void
{
	var newCircle:Sprite = createCircleSprite();
	newCircle.x = Math.random()*(stage.stageWidth - newCircle.width);
	newCircle.y = - newCircle.height;
	circles.push(newCircle); //Here we add the circles to the array
	addChild(circles[circles.length-1]);
}
function onEnterFrame(event:Event):void
{
	for (var i:int = 0;i<circles.length;i++) { //Increase every circles y by CIRCLE_SPD each frame.
		circles[i].y+=CIRCLE_SPD;
	}
}
function createCircleSprite():Sprite
{
	var radius:int = CIRCLE_RADIUS_MIN + Math.random()*(CIRCLE_RADIUS_MAX - CIRCLE_RADIUS_MIN);
	var tempCircle:Sprite = new Sprite();

	tempCircle.graphics.lineStyle();
	tempCircle.graphics.beginFill(Math.random()*0xFFFFFF);
	tempCircle.graphics.drawCircle(radius/2, radius/2, radius);
	tempCircle.graphics.endFill();

	return tempCircle;
}
function getRandomChild():DisplayObject { //DisplayObject class chosen for maximum compatibility
  var ind:uint = Math.floor(Math.random() * numChildren);
  return getChildAt(ind);
  //Remember to cast the return value of this function to the appropriate type!
}

None

Ben-Fox

Reply To Post Reply & Quote

Posted at: 9/11/08 05:03 PM

Ben-Fox LIGHT LEVEL 07

Sign-Up: 12/27/03

Posts: 571

The circles are already held in an array, namely the display list of the Stage. Calling addChild is in many ways functionally equivalent to calling an array.push on the display list of the parent object. The new addition won't alter my own function in any significant way, but it will probably place the Sprite references in a location where other contributors not comfortable with working with the display list directly can easily get at them, so I say go for it.


None

PrettyMuchBryce

Reply To Post Reply & Quote

Posted at: 9/11/08 05:05 PM

PrettyMuchBryce LIGHT LEVEL 06

Sign-Up: 03/17/01

Posts: 1,341

At 9/11/08 05:03 PM, Ben-Fox wrote: The circles are already held in an array, namely the display list of the Stage. Calling addChild is in many ways functionally equivalent to calling an array.push on the display list of the parent object. The new addition won't alter my own function in any significant way, but it will probably place the Sprite references in a location where other contributors not comfortable with working with the display list directly can easily get at them, so I say go for it.

Yes I understand, but my problem is that if we add other objects to the stage then that function could select other things rather than just the circles. Correct me if I'm wrong on this though.


None

Ben-Fox

Reply To Post Reply & Quote

Posted at: 9/11/08 05:12 PM

Ben-Fox LIGHT LEVEL 07

Sign-Up: 12/27/03

Posts: 571

You are exactly correct, my function will return a random child from any child added to the display list of the stage, which is the intended functionality and why it returns a DisplayObject instead of a Sprite. At this point I can't know if MovieClips or Shapes or other DisplayObject descendants that aren't Sprites might be added to the stage, so I chose the highest level of inheritance all these things have in common for maximum compatibility. Perfect for making totally random things blow up, dontcha think? :D


Goofy

unbelivable

Reply To Post Reply & Quote

Posted at: 9/11/08 05:53 PM

unbelivable DARK LEVEL 10

Sign-Up: 06/10/08

Posts: 556

Heres my entry

//Unbelivable was here :D

.

BBS Signature

None

deadlock32

Reply To Post Reply & Quote

Posted at: 9/11/08 06:11 PM

deadlock32 NEUTRAL LEVEL 18

Sign-Up: 04/28/01

Posts: 2,502

At 9/11/08 04:57 PM, PrettyMuchBryce wrote: I made it so the circles descend and are created above the stage. However, I think I voided the previous posters function by putting the circles in an array. I kept it in there anyways though. If there is a way to make this more efficient please tell me. This is a learning exercise for me.

Ok sir here is another way to accomplish what you coded. (please feel free to post back your existing work over mine. I am posting this up because you asked. (i also got rid of the dividing on the circle creation ^_^ )

stage.frameRate = 30;
const CIRCLE_RADIUS_MIN:int = 25;
const CIRCLE_RADIUS_MAX:int = 50;
const CIRCLE_SPD:int = 7;
const CIRCLE_CREATION_DELAY:int = 500;
var maxCircles:int = 50;
var circles:Array = new Array(); //lets make a container so we can easily access the circles?

var circleCreationTimer:Timer = new Timer(CIRCLE_CREATION_DELAY, 0);
circleCreationTimer.addEventListener(Tim erEvent.TIMER, createCircleEvent);
circleCreationTimer.start();

function createCircleEvent(timerEvent:TimerEvent)
:void
{
var newCircle:Sprite = createCircleSprite();
newCircle.x = Math.random()*(stage.stageWidth - newCircle.width);
newCircle.y = - newCircle.height;
circles.push(newCircle); //Here we add the circles to the array

newCircle.addEventListener(Event.ENTER_F RAME, onCircleEnterFrame);

addChild(circles[circles.length - 1]);

}

// this is a method for not polling though an array.
// there is a trade off for this method, using a var for current cirlce
// increases amount of garbage to collect, but this is a light enough app where you dont
// need to worry about that yet. I am going to write an article about local variable and garbage collection.
function onCircleEnterFrame(event:Event):void
{
var currentCircle:Sprite = event.currentTarget as Sprite;
currentCircle.y += CIRCLE_SPD;

if ((currentCircle.y - currentCircle.height) > stage.stageHeight)
{
currentCircle.removeEventListener(Event.
ENTER_FRAME, onCircleEnterFrame); // EXTREMELY IMPORTANT FOR GARBAGE COLLECTION
removeChild(currentCircle);
circles.splice(circles.indexOf(currentCi rcle), 1);
}
}

function createCircleSprite():Sprite
{
var radius:int = CIRCLE_RADIUS_MIN + Math.random()*(CIRCLE_RADIUS_MAX - CIRCLE_RADIUS_MIN);
var tempCircle:Sprite = new Sprite();

tempCircle.graphics.lineStyle();
tempCircle.graphics.beginFill(Math.rando m()*0xFFFFFF);
tempCircle.graphics.drawCircle(radius, radius, radius);
tempCircle.graphics.endFill();

return tempCircle;
}
function getRandomChild():DisplayObject { //DisplayObject class chosen for maximum compatibility
var ind:uint = Math.floor(Math.random() * numChildren);
return getChildAt(ind);
//Remember to cast the return value of this function to the appropriate type!
}


None

deadlock32

Reply To Post Reply & Quote

Posted at: 9/11/08 06:13 PM

deadlock32 NEUTRAL LEVEL 18

Sign-Up: 04/28/01

Posts: 2,502

forgot the code tags T_T

stage.frameRate = 30;
const CIRCLE_RADIUS_MIN:int = 25;
const CIRCLE_RADIUS_MAX:int = 50;
const CIRCLE_SPD:int = 7;
const CIRCLE_CREATION_DELAY:int = 500;
var maxCircles:int = 50;
var circles:Array = new Array(); //lets make a container so we can easily access the circles?

var circleCreationTimer:Timer = new Timer(CIRCLE_CREATION_DELAY, 0);
circleCreationTimer.addEventListener(TimerEvent.TIMER, createCircleEvent);
circleCreationTimer.start();

function createCircleEvent(timerEvent:TimerEvent):void
{
	var newCircle:Sprite = createCircleSprite();
	newCircle.x = Math.random()*(stage.stageWidth - newCircle.width);
	newCircle.y = - newCircle.height;
	circles.push(newCircle); //Here we add the circles to the array
	
	newCircle.addEventListener(Event.ENTER_FRAME, onCircleEnterFrame);
	
	addChild(circles[circles.length - 1]);
	
}

// this is a method for not polling though an array.
// there is a trade off for this method, using a var for current cirlce 
// increases amount of garbage to collect, but this is a light enough app where you dont 
// need to worry about that yet.  I am going to write an article about local variable and garbage collection.
function onCircleEnterFrame(event:Event):void
{
	var currentCircle:Sprite = event.currentTarget as Sprite;
	currentCircle.y += CIRCLE_SPD;
	
	if ((currentCircle.y - currentCircle.height) > stage.stageHeight)
	{
		currentCircle.removeEventListener(Event.ENTER_FRAME, onCircleEnterFrame); // EXTREMELY IMPORTANT FOR GARBAGE COLLECTION
		removeChild(currentCircle);
		circles.splice(circles.indexOf(currentCircle), 1);
	}
}

function createCircleSprite():Sprite
{
	var radius:int = CIRCLE_RADIUS_MIN + Math.random()*(CIRCLE_RADIUS_MAX - CIRCLE_RADIUS_MIN);
	var tempCircle:Sprite = new Sprite();

	tempCircle.graphics.lineStyle();
	tempCircle.graphics.beginFill(Math.random()*0xFFFFFF);
	tempCircle.graphics.drawCircle(radius, radius, radius);
	tempCircle.graphics.endFill();

	return tempCircle;
}
function getRandomChild():DisplayObject { //DisplayObject class chosen for maximum compatibility
  var ind:uint = Math.floor(Math.random() * numChildren);
  return getChildAt(ind);
  //Remember to cast the return value of this function to the appropriate type!
}

None

Renandchi2

Reply To Post Reply & Quote

Posted at: 9/11/08 06:52 PM

Renandchi2 FAB LEVEL 13

Sign-Up: 07/24/08

Posts: 1,538

on(press) {
gotoAndPlay(2)
}

lol

Details Tutorial Collab '09! Join now!
PM me if you like my sig! Lovers so far=4
Thanks to littleMonsterGames for the inspiration to make this

BBS Signature

None

Ben-Fox

Reply To Post Reply & Quote

Posted at: 9/11/08 07:20 PM

Ben-Fox LIGHT LEVEL 07

Sign-Up: 12/27/03

Posts: 571

Replaces the original getRandomChild function, to allow for other arrays holding categories of sprites to be used.

stage.frameRate = 30;
const CIRCLE_RADIUS_MIN:int = 25;
const CIRCLE_RADIUS_MAX:int = 50;
const CIRCLE_SPD:int = 7;
const CIRCLE_CREATION_DELAY:int = 500;
var maxCircles:int = 50;
var circles:Array = new Array(); //lets make a container so we can easily access the circles?

var circleCreationTimer:Timer = new Timer(CIRCLE_CREATION_DELAY, 0);
circleCreationTimer.addEventListener(TimerEvent.TIMER, createCircleEvent);
circleCreationTimer.start();

function createCircleEvent(timerEvent:TimerEvent):void
{
	var newCircle:Sprite = createCircleSprite();
	newCircle.x = Math.random()*(stage.stageWidth - newCircle.width);
	newCircle.y = - newCircle.height;
	circles.push(newCircle); //Here we add the circles to the array
	
	newCircle.addEventListener(Event.ENTER_FRAME, onCircleEnterFrame);
	
	addChild(circles[circles.length - 1]);
	
}

// this is a method for not polling though an array.
// there is a trade off for this method, using a var for current cirlce 
// increases amount of garbage to collect, but this is a light enough app where you dont 
// need to worry about that yet.  I am going to write an article about local variable and garbage collection.
function onCircleEnterFrame(event:Event):void
{
	var currentCircle:Sprite = event.currentTarget as Sprite;
	currentCircle.y += CIRCLE_SPD;
	
	if ((currentCircle.y - currentCircle.height) > stage.stageHeight)
	{
		currentCircle.removeEventListener(Event.ENTER_FRAME, onCircleEnterFrame); // EXTREMELY IMPORTANT FOR GARBAGE COLLECTION
		removeChild(currentCircle);
		circles.splice(circles.indexOf(currentCircle), 1);
	}
}

function createCircleSprite():Sprite
{
	var radius:int = CIRCLE_RADIUS_MIN + Math.random()*(CIRCLE_RADIUS_MAX - CIRCLE_RADIUS_MIN);
	var tempCircle:Sprite = new Sprite();

	tempCircle.graphics.lineStyle();
	tempCircle.graphics.beginFill(Math.random()*0xFFFFFF);
	tempCircle.graphics.drawCircle(radius, radius, radius);
	tempCircle.graphics.endFill();

	return tempCircle;
}

function getRandomSprite(sourceArray:Array = null):Sprite {
     if (sourceArray == null) { //If no array reference is passed to the function...
          //Choose any child on the stage to return.
          return getChildAt(Math.floor(Math.random() * numChildren)) as Sprite;
     } else {
          //Return a reference from the specified array
          return sourceArray[Math.floor(Math.random() * sourceArray.length)] as Sprite; //Just in case
      }
}

None

PrettyMuchBryce

Reply To Post Reply & Quote

Posted at: 9/11/08 08:00 PM

PrettyMuchBryce LIGHT LEVEL 06

Sign-Up: 03/17/01

Posts: 1,341

Nice work ben! :)


None

FatKidWitAJetPak

Reply To Post Reply & Quote

Posted at: 9/11/08 10:05 PM

FatKidWitAJetPak LIGHT LEVEL 24

Sign-Up: 07/28/07

Posts: 3,778

Lol hey.. maybe we should combine our collabs together!!!

Well anyway, here is a cool part I made with this AS2 Coding. Wish I has AS3... but I don't. I can still create some really nice effects though.

Hope you can somehow manage to throw it in with your coding... if not, sorry for taking up space

With this bit od code, you can make the movie clip go across the screen in a really cool way. When you change the numbers around, you get more effects. I made THIS EFFECT with this coding and one movie clip. REALLY COOL.

attachMovie("ball", "ball", 1)
ball._x = 2000
ball._y = 200
timey = 0
fps = 2
xvel = 9
yvel = 3
xcha =.1
ycha =.1
i = 0

onEnterFrame = function(){
	timey ++
	if(timey == fps){
		dave = _root.attachMovie("blob","blob" + i, _root.getNextHighestDepth())
		dave._x = ball._x
		dave._y = ball._y
		timey = 1.0
		i++
	}
}

ball.onEnterFrame = function(){
	this._x -= xvel
	this._y -= yvel
	xvel += xcha
	yvel -= ycha
	if(xvel >= 3 || xvel <= -3){
		xcha = -xcha 
	}
	if(yvel >= 3 || yvel <= -3){
		ycha = -ycha 
	}
	if(this._x > 500){
		this._x = 0
	}
	if(this._x < 0){
		this._x = 500
	}
	if(this._y > 400){
		this._y = 0
	}
	if(this._y < 0){
		this._y = 400
	}
}

Also, I have this really advanced FUSE Coding... It can make all kinds of effects, but i threw this together which has this coding...

import com.mosesSupposes.fuse.*;
ZigoEngine.register(Fuse, PennerEasing);
this.createEmptyMovieClip("leader", 3);
function moveLeader():Void {
	var f:Fuse = new Fuse();
	f.push({target:leader, x:grp, y:grp, controlX:grp, controlY:grp, time:1, ease:"linear"});
	f.push({func:moveLeader});
	f.start();
}
moveLeader();
function grp():Number {
	return Math.random()*600;
}
this.onEnterFrame = function() {
	var t:MovieClip = this.attachMovie("circ", "circ"+this.getNextHighestDepth(), this.getNextHighestDepth());
	t._x = leader._x;
	t._y = leader._y;
	var f:Fuse = new Fuse();
	f.push({target:t, scale:300, tint:Math.random()*0xFFFFFF, alpha:Math.random(), gravity:Math.random(), x:10, y:80, alpha:0, time:1, ease:"linear"});
	f.push({func:function () {
		t.removeMovieClip();
	}});
	f.start();
};

You have to have fuse to use that coding though// I really recommend getting it anf using it in the collab. It has some really nice random motion effects.

DIRECT DOWNLOAD LINK TO GET FUSE.

EXAMPLE I DID

http://spamtheweb.com/ul/upload/090908/7 3845_par.php

Good luck everyone!

The Fallout 3 Fan Club. Join Today!
Voice Acting TUTORIAL!
Click My Sig Below If You Need A Voice Actor! Oh And I Love Pancakes. ROOOOOOOOOAAAAAAAAARRRRRRRRRRR!!!

BBS Signature

None

Calipe

Reply To Post Reply & Quote

Posted at: 9/11/08 10:28 PM

Calipe LIGHT LEVEL 30

Sign-Up: 02/28/04

Posts: 448

Ok guys I took the liberty to add several lines to the app. It's ok if you guys later decide that it was too much for one post, I just wanted to let you know of a possible route that the app can take. I added a comment to the block of codes that I added. They are marked by a ***Added by Calipe*** comment. Feel free to comment.

stage.frameRate = 30;
const CIRCLE_RADIUS_MIN:int = 25;
const CIRCLE_RADIUS_MAX:int = 50;
const CIRCLE_SPD:int = 7;
const CIRCLE_CREATION_DELAY:int = 500;
const GRAVITY:int = 5; //Gravity applied to particles ***Added by Calipe***
var maxParticles:int = 10; //Max number of particles 
var maxCircles:int = 50;
var circles:Array = new Array(); //lets make a container so we can easily access the circles?

var circleCreationTimer:Timer = new Timer(CIRCLE_CREATION_DELAY, 0);
circleCreationTimer.addEventListener(TimerEvent.TIMER, createCircleEvent);
circleCreationTimer.start();

function createCircleEvent(timerEvent:TimerEvent):void
{
	var newCircle:Sprite = createCircleSprite();
	newCircle.x = Math.random()*(stage.stageWidth - newCircle.width);
	newCircle.y = - newCircle.height;
	circles.push(newCircle); //Here we add the circles to the array
	
	newCircle.addEventListener(Event.ENTER_FRAME, onCircleEnterFrame);
	newCircle.addEventListener(MouseEvent.MOUSE_OVER, mouseDownListener, false, 0, true); //Registers the circle for the mouse over event ***Added by Calipe***
	
	addChild(circles[circles.length - 1]);
	
}

// this is a method for not polling though an array.
// there is a trade off for this method, using a var for current cirlce 
// increases amount of garbage to collect, but this is a light enough app where you dont 
// need to worry about that yet.  I am going to write an article about local variable and garbage collection.
function onCircleEnterFrame(event:Event):void
{
	var currentCircle:Sprite = event.currentTarget as Sprite;
	currentCircle.y += CIRCLE_SPD;
	
	if ((currentCircle.y - currentCircle.height) > stage.stageHeight)
	{
		currentCircle.removeEventListener(Event.ENTER_FRAME, onCircleEnterFrame); // EXTREMELY IMPORTANT FOR GARBAGE COLLECTION
		removeChild(currentCircle);
		circles.splice(circles.indexOf(currentCircle), 1);
	}
}

function createCircleSprite():Sprite
{
	var radius:int = CIRCLE_RADIUS_MIN + Math.random()*(CIRCLE_RADIUS_MAX - CIRCLE_RADIUS_MIN);
	var tempCircle:Sprite = new Sprite();

	tempCircle.graphics.lineStyle();
	tempCircle.graphics.beginFill(Math.random()*0xFFFFFF);
	tempCircle.graphics.drawCircle(radius, radius, radius);
	tempCircle.graphics.endFill();

	return tempCircle;
}

function getRandomSprite(sourceArray:Array = null):Sprite {
     if (sourceArray == null) { //If no array reference is passed to the function...
          //Choose any child on the stage to return.
          return getChildAt(Math.floor(Math.random() * numChildren)) as Sprite;
     } else {
          //Return a reference from the specified array
          return sourceArray[Math.floor(Math.random() * sourceArray.length)] as Sprite; //Just in case
      }
}


//The event listener function that is triggered when the mouse over event is dipatched ***Added by Calipe***

function mouseDownListener(event:MouseEvent):void
{
	removeChild(Sprite(event.target));
	circles.splice(circles.indexOf(Sprite(event.target)), 1);
	event.target.removeEventListener(Event.ENTER_FRAME, onCircleEnterFrame);
	createParticles();
}

//Creates the particles ***Added by Calipe***

function createParticles():void
{
	for (var i:int = 0; i < maxParticles; i++)
	{
		var particle:MovieClip = new MovieClip();
		particle.graphics.beginFill(Math.random() * 0xFFFFFF);
		particle.graphics.drawCircle(0, 0, Math.random() * 10 + 5);
		particle.vx = Math.random() * 30 - 15;
		particle.vy = Math.random() * -50;
		particle.x = mouseX;
		particle.y = mouseY;
		particle.addEventListener(Event.ENTER_FRAME, particleEnterFrame, false, 0, true);
		addChild(particle);
	}
}

//Particles enter frame listener ***Added by Calipe***

function particleEnterFrame(event:Event):void
{
	var tempParticle:MovieClip = MovieClip(event.target);
	if ( tempParticle.y < stage.stageHeight)
	{
		tempParticle.vy += GRAVITY;
		tempParticle.x += tempParticle.vx;
		tempParticle.y += tempParticle.vy;
	}
	else
	{
		removeChild(tempParticle);
		tempParticle.removeEventListener(Event.ENTER_FRAME, particleEnterFrame, false);
	}
}

None

FatKidWitAJetPak

Reply To Post Reply & Quote

Posted at: 9/11/08 11:09 PM

FatKidWitAJetPak LIGHT LEVEL 24

Sign-Up: 07/28/07

Posts: 3,778

stage.frameRate = 30;
const CIRCLE_RADIUS_MIN:int = 25;
const CIRCLE_RADIUS_MAX:int = 50;
const CIRCLE_SPD:int = 7;
const CIRCLE_CREATION_DELAY:int = 500;
const GRAVITY:int = 5; //Gravity applied to particles ***Added by Calipe***
var maxParticles:int = 10; //Max number of particles
var maxCircles:int = 50;
var circles:Array = new Array(); //lets make a container so we can easily access the circles?

var circleCreationTimer:Timer = new Timer(CIRCLE_CREATION_DELAY, 0);
circleCreationTimer.addEventListener(Tim erEvent.TIMER, createCircleEvent);
circleCreationTimer.start();

function createCircleEvent(timerEvent:TimerEvent)
:void
{
var newCircle:Sprite = createCircleSprite();
newCircle.x = Math.random()*(stage.stageWidth - newCircle.width);
newCircle.y = - newCircle.height;
circles.push(newCircle); //Here we add the circles to the array

newCircle.addEventListener(Event.ENTER_F RAME, onCircleEnterFrame);
newCircle.addEventListener(MouseEvent.MO USE_OVER, mouseDownListener, false, 0, true); //Registers the circle for the mouse over event ***Added by Calipe***

addChild(circles[circles.length - 1]);

}

// this is a method for not polling though an array.
// there is a trade off for this method, using a var for current cirlce
// increases amount of garbage to collect, but this is a light enough app where you dont
// need to worry about that yet. I am going to write an article about local variable and garbage collection.
function onCircleEnterFrame(event:Event):void
{
var currentCircle:Sprite = event.currentTarget as Sprite;
currentCircle.y += CIRCLE_SPD;

if ((currentCircle.y - currentCircle.height) > stage.stageHeight)
{
currentCircle.removeEventListener(Event.
ENTER_FRAME, onCircleEnterFrame); // EXTREMELY IMPORTANT FOR GARBAGE COLLECTION
removeChild(currentCircle);
circles.splice(circles.indexOf(currentCi rcle), 1);
}
}

function createCircleSprite():Sprite
{
var radius:int = CIRCLE_RADIUS_MIN + Math.random()*(CIRCLE_RADIUS_MAX - CIRCLE_RADIUS_MIN);
var tempCircle:Sprite = new Sprite();

tempCircle.graphics.lineStyle();
tempCircle.graphics.beginFill(Math.rando m()*0xFFFFFF);
tempCircle.graphics.drawCircle(radius, radius, radius);
tempCircle.graphics.endFill();

return tempCircle;
}

function getRandomSprite(sourceArray:Array = null):Sprite {
if (sourceArray == null) { //If no array reference is passed to the function...
//Choose any child on the stage to return.
return getChildAt(Math.floor(Math.random() * numChildren)) as Sprite;
} else {
//Return a reference from the specified array
return sourceArray[Math.floor(Math.random() * sourceArray.length)] as Sprite; //Just in case
}
}

//The event listener function that is triggered when the mouse over event is dipatched ***Added by Calipe***

function mouseDownListener(event:MouseEvent):void
{
removeChild(Sprite(event.target));
circles.splice(circles.indexOf(Sprite(ev ent.target)), 1);
event.target.removeEventListener(Event.E NTER_FRAME, onCircleEnterFrame);
createParticles();
}

//Creates the particles ***Added by Calipe***

function createParticles():void
{
for (var i:int = 0; i < maxParticles; i++)
{
var particle:MovieClip = new MovieClip();
particle.graphics.beginFill(Math.random(
) * 0xFFFFFF);
particle.graphics.drawCircle(0, 0, Math.random() * 10 + 5);
particle.vx = Math.random() * 30 - 15;
particle.vy = Math.random() * -50;
particle.x = mouseX;
particle.y = mouseY;
particle.addEventListener(Event.ENTER_FR AME, particleEnterFrame, false, 0, true);
addChild(particle);
}
}

//Particles enter frame listener ***Added by Calipe***

function particleEnterFrame(event:Event):void
{
var tempParticle:MovieClip = MovieClip(event.target);
if ( tempParticle.y < stage.stageHeight)
{
tempParticle.vy += GRAVITY;
tempParticle.x += tempParticle.vx;
tempParticle.y += tempParticle.vy;
}
else
{
removeChild(tempParticle);
tempParticle.removeEventListener(Event.E NTER_FRAME, particleEnterFrame, false);
}
}
attachMovie("ball", "ball", 1)
ball._x = 2000
ball._y = 200
timey = 0
fps = 2
xvel = 9
yvel = 3
xcha =.1
ycha =.1
i = 0

onEnterFrame = function(){
timey ++
if(timey == fps){
dave = _root.attachMovie("blob","blob" + i, _root.getNextHighestDepth())
dave._x = ball._x
dave._y = ball._y
timey = 1.0
i++
}
}

ball.onEnterFrame = function(){
this._x -= xvel
this._y -= yvel
xvel += xcha
yvel -= ycha
if(xvel >= 3 || xvel <= -3){
xcha = -xcha
}
if(yvel >= 3 || yvel <= -3){
ycha = -ycha
}
if(this._x > 500){
this._x = 0
}
if(this._x < 0){
this._x = 500
}
if(this._y > 400){
this._y = 0
}
if(this._y < 0){
this._y = 400
}
}

Hmm... Does that coding fit correclty?

The Fallout 3 Fan Club. Join Today!
Voice Acting TUTORIAL!
Click My Sig Below If You Need A Voice Actor! Oh And I Love Pancakes. ROOOOOOOOOAAAAAAAAARRRRRRRRRRR!!!

BBS Signature

None

Calipe

Reply To Post Reply & Quote

Posted at: 9/12/08 12:13 AM

Calipe LIGHT LEVEL 30

Sign-Up: 02/28/04

Posts: 448


Hmm... Does that coding fit correclty?

I do not believe it does. I did not learn AS 2 because I ent straight to ActionScript 3.0 but I think the language you are using is AS 2. As you probably know ActionScript 3.0 is not compatible with AS 2.


None

deadlock32

Reply To Post Reply & Quote

Posted at: 9/12/08 02:23 AM

deadlock32 NEUTRAL LEVEL 18

Sign-Up: 04/28/01

Posts: 2,502

I added a chain reaction system to the circles popping. With all these new display objects on the screen, Ben-Fox (or anyone) could pull a another nifty effect using the get random object from array or stage.

Good job so far.
^_^

/* AS3 Code Collab! <http://www.newgrounds.com/bbs/topic/966360>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * A copy of the GNU General Public License is available at:
 * <http://www.gnu.org/licenses/>.
 */

stage.frameRate = 30;
const CIRCLE_RADIUS_MIN:int = 25;
const CIRCLE_RADIUS_MAX:int = 50;
const CIRCLE_SPD:int = 7;
const CIRCLE_CREATION_DELAY:int = 500;
const GRAVITY:int = 5; //Gravity applied to particles ***Added by Calipe***
var maxParticles:int = 10; //Max number of particles 
var maxCircles:int = 50;
var circles:Array = new Array(); //lets make a container so we can easily access the circles?


var circleCreationTimer:Timer = new Timer(CIRCLE_CREATION_DELAY, 0);
circleCreationTimer.addEventListener(TimerEvent.TIMER, createCircleEvent, false, 10, false);
circleCreationTimer.start();

function createCircleEvent(timerEvent:TimerEvent):void
{
	var newCircle:Sprite = createCircleSprite();
	newCircle.x = Math.random()*(stage.stageWidth - newCircle.width);
	newCircle.y = - newCircle.height;
	circles.push(newCircle); //Here we add the circles to the array
	
	newCircle.addEventListener(Event.ENTER_FRAME, onCircleEnterFrame, false, 5, true);
	newCircle.addEventListener(MouseEvent.MOUSE_OVER, mouseOverListener, false, 0, true); //Registers the circle for the mouse over event ***Added by Calipe***
	
	addChild(circles[circles.length - 1]);
	
}

// original content **PrettyMuchBryce** ( modified )
function onCircleEnterFrame(event:Event):void
{
	var currentCircle:Sprite = event.currentTarget as Sprite;
	currentCircle.y += CIRCLE_SPD;
	
	if ((currentCircle.y - currentCircle.height) > stage.stageHeight)
	{
		currentCircle.removeEventListener(Event.ENTER_FRAME, onCircleEnterFrame); // EXTREMELY IMPORTANT FOR GARBAGE COLLECTION
		removeChild(currentCircle);
		circles.splice(circles.indexOf(currentCircle), 1);
	}
}

function createCircleSprite():Sprite
{
	var radius:int = CIRCLE_RADIUS_MIN + Math.random()*(CIRCLE_RADIUS_MAX - CIRCLE_RADIUS_MIN);
	var tempCircle:Sprite = new Sprite();

	tempCircle.graphics.lineStyle();
	tempCircle.graphics.beginFill(Math.random()*0xFFFFFF);
	tempCircle.graphics.drawCircle(radius, radius, radius);
	tempCircle.graphics.endFill();

	return tempCircle;
}
// ** Ben-Fox ** random display object getter
function getRandomSprite(sourceArray:Array = null):Sprite {
     if (sourceArray == null) { //If no array reference is passed to the function...
          //Choose any child on the stage to return.
          return getChildAt(Math.floor(Math.random() * numChildren)) as Sprite;
     } else {
          //Return a reference from the specified array
          return sourceArray[Math.floor(Math.random() * sourceArray.length)] as Sprite; //Just in case
      }
}


//The event listener function that is triggered when the mouse over event is dipatched ***Added by Calipe***

function mouseOverListener(event:MouseEvent):void
{
	
	popCircle(Sprite(event.target), mouseX, mouseY);
}

// updated the circle pop, so mouse overs were not the only method for triggering them.  ** deadlock32 **
function popCircle(targetCircle:DisplayObject, centerX:Number, centerY:Number):void
{
	removeChild(targetCircle);
	circles.splice(circles.indexOf(targetCircle), 1);
	targetCircle.removeEventListener(Event.ENTER_FRAME, onCircleEnterFrame);
	createParticles(centerX, centerY);
}

//Creates the particles ***Added by Calipe***

function createParticles(centerX:Number, centerY:Number):void
{
	for (var i:int = 0; i < maxParticles; i++)
	{
		var particle:MovieClip = new MovieClip();
		particle.graphics.beginFill(Math.random() * 0xFFFFFF);
		particle.graphics.drawCircle(0, 0, Math.random() * 10 + 5);
		particle.vx = Math.random() * 30 - 15;
		particle.vy = Math.random() * -50;
		particle.x = centerX;
		particle.y = centerY;
		particle.addEventListener(Event.ENTER_FRAME, particleEnterFrame, false, 0, true);
		addChild(particle);
	}
}

//Particles enter frame listener ***Added by Calipe***

function particleEnterFrame(event:Event):void
{

	
	var tempParticle:MovieClip = MovieClip(event.target);
	if ( tempParticle.y < stage.stageHeight)
	{
		checkIfParticlePopsCircle(tempParticle);
		
		tempParticle.vy += GRAVITY;
		tempParticle.x += tempParticle.vx;
		tempParticle.y += tempParticle.vy;
		
		
	}
	else
	{
		removeChild(tempParticle);
		tempParticle.removeEventListener(Event.ENTER_FRAME, particleEnterFrame, false);
	}
}


// added a function to check if a particle is touching another circle  
// by deadlock32
function checkIfParticlePopsCircle(targetParticle:DisplayObject):void
{
	var targetParticleRadius:Number = targetParticle.width * 0.5;
	for each(var tempCircle:DisplayObject in circles)
	{
		var circleRadius:Number = tempCircle.width * 0.5;
		var collisionDistanceMax:Number = targetParticleRadius + circleRadius;
		
		var distanceApart:Number = Point.distance(new Point(targetParticle.x, targetParticle.y), new Point(tempCircle.x, tempCircle.y));
		
		if(distanceApart <= collisionDistanceMax)
		{
			popCircle(tempCircle, tempCircle.x, tempCircle.y);
			break;
		}
		// the above was 100%... for some reason if you wanna figure out why go for it
		// I added the below to help compensate
		if(tempCircle.hitTestPoint(targetParticle.x, targetParticle.y, true))
		{
			popCircle(tempCircle, tempCircle.x, tempCircle.y);
			break;
		}
	}
}

None

Kajenx

Reply To Post Reply & Quote

Posted at: 9/12/08 04:27 AM

Kajenx DARK LEVEL 16

Sign-Up: 12/01/06

Posts: 752

I added a pretty blue counter. :3

/* AS3 Code Collab! <http://www.newgrounds.com/bbs/topic/966360>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * A copy of the GNU General Public License is available at:
 * <http://www.gnu.org/licenses/>.
 */

stage.frameRate = 30;
const CIRCLE_RADIUS_MIN:int = 25;
const CIRCLE_RADIUS_MAX:int = 50;
const CIRCLE_SPD:int = 7;
const CIRCLE_CREATION_DELAY:int = 500;
const GRAVITY:int = 5; //Gravity applied to particles ***Added by Calipe***
var maxParticles:int = 10; //Max number of particles 
var maxCircles:int = 50;
var circles:Array = new Array(); //lets make a container so we can easily access the circles?

var poppedCircles:int = 0; //Circle Counter Startup (Kajenx waz hur :3)
var poppedCirclesCounter:TextField = new TextField;
addChild(poppedCirclesCounter);
poppedCirclesCounter.x = 10;
poppedCirclesCounter.y = 10;
poppedCirclesCounter.selectable = false;
poppedCirclesCounter.textColor = 0x0088FF
poppedCirclesCounter.text = "Popped: 0";

var circleCreationTimer:Timer = new Timer(CIRCLE_CREATION_DELAY, 0);
circleCreationTimer.addEventListener(TimerEvent.TIMER, createCircleEvent, false, 10, false);
circleCreationTimer.start();

function createCircleEvent(timerEvent:TimerEvent):void
{
	var newCircle:Sprite = createCircleSprite();
	newCircle.x = Math.random()*(stage.stageWidth - newCircle.width);
	newCircle.y = - newCircle.height;
	circles.push(newCircle); //Here we add the circles to the array
	
	newCircle.addEventListener(Event.ENTER_FRAME, onCircleEnterFrame, false, 5, true);
	newCircle.addEventListener(MouseEvent.MOUSE_OVER, mouseOverListener, false, 0, true); //Registers the circle for the mouse over event ***Added by Calipe***
	
	addChild(circles[circles.length - 1]);
	
}

// original content **PrettyMuchBryce** ( modified )
function onCircleEnterFrame(event:Event):void
{
	var currentCircle:Sprite = event.currentTarget as Sprite;
	currentCircle.y += CIRCLE_SPD;
	
	if ((currentCircle.y - currentCircle.height) > stage.stageHeight)
	{
		currentCircle.removeEventListener(Event.ENTER_FRAME, onCircleEnterFrame); // EXTREMELY IMPORTANT FOR GARBAGE COLLECTION
		removeChild(currentCircle);
		circles.splice(circles.indexOf(currentCircle), 1);
	}
}

function createCircleSprite():Sprite
{
	var radius:int = CIRCLE_RADIUS_MIN + Math.random()*(CIRCLE_RADIUS_MAX - CIRCLE_RADIUS_MIN);
	var tempCircle:Sprite = new Sprite();

	tempCircle.graphics.lineStyle();
	tempCircle.graphics.beginFill(Math.random()*0xFFFFFF);
	tempCircle.graphics.drawCircle(radius, radius, radius);
	tempCircle.graphics.endFill();

	return tempCircle;
}
// ** Ben-Fox ** random display object getter
function getRandomSprite(sourceArray:Array = null):Sprite {
     if (sourceArray == null) { //If no array reference is passed to the function...
          //Choose any child on the stage to return.
          return getChildAt(Math.floor(Math.random() * numChildren)) as Sprite;
     } else {
          //Return a reference from the specified array
          return sourceArray[Math.floor(Math.random() * sourceArray.length)] as Sprite; //Just in case
      }
}


//The event listener function that is triggered when the mouse over event is dipatched ***Added by Calipe***

function mouseOverListener(event:MouseEvent):void
{
	
	popCircle(Sprite(event.target), mouseX, mouseY);
}

// updated the circle pop, so mouse overs were not the only method for triggering them.  ** deadlock32 **
function popCircle(targetCircle:DisplayObject, centerX:Number, centerY:Number):void
{
	// Count popped circles
	poppedCircles++;
	poppedCirclesCounter.text = "Popped: " + String(poppedCircles);
	
	removeChild(targetCircle);
	circles.splice(circles.indexOf(targetCircle), 1);
	targetCircle.removeEventListener(Event.ENTER_FRAME, onCircleEnterFrame);
	createParticles(centerX, centerY);
}

//Creates the particles ***Added by Calipe***

function createParticles(centerX:Number, centerY:Number):void
{
	for (var i:int = 0; i < maxParticles; i++)
	{
		var particle:MovieClip = new MovieClip();
		particle.graphics.beginFill(Math.random() * 0xFFFFFF);
		particle.graphics.drawCircle(0, 0, Math.random() * 10 + 5);
		particle.vx = Math.random() * 30 - 15;
		particle.vy = Math.random() * -50;
		particle.x = centerX;
		particle.y = centerY;
		particle.addEventListener(Event.ENTER_FRAME, particleEnterFrame, false, 0, true);
		addChild(particle);
	}
}

//Particles enter frame listener ***Added by Calipe***

function particleEnterFrame(event:Event):void
{

	
	var tempParticle:MovieClip = MovieClip(event.target);
	if ( tempParticle.y < stage.stageHeight)
	{
		checkIfParticlePopsCircle(tempParticle);
		
		tempParticle.vy += GRAVITY;
		tempParticle.x += tempParticle.vx;
		tempParticle.y += tempParticle.vy;
		
		
	}
	else
	{
		removeChild(tempParticle);
		tempParticle.removeEventListener(Event.ENTER_FRAME, particleEnterFrame, false);
	}
}


// added a function to check if a particle is touching another circle  
// by deadlock32
function checkIfParticlePopsCircle(targetParticle:DisplayObject):void
{
	var targetParticleRadius:Number = targetParticle.width * 0.5;
	for each(var tempCircle:DisplayObject in circles)
	{
		var circleRadius:Number = tempCircle.width * 0.5;
		var collisionDistanceMax:Number = targetParticleRadius + circleRadius;
		
		var distanceApart:Number = Point.distance(new Point(targetParticle.x, targetParticle.y), new Point(tempCircle.x, tempCircle.y));
		
		if(distanceApart <= collisionDistanceMax)
		{
			popCircle(tempCircle, tempCircle.x, tempCircle.y);
			break;
		}
		// the above was 100%... for some reason if you wanna figure out why go for it
		// I added the below to help compensate
		if(tempCircle.hitTestPoint(targetParticle.x, targetParticle.y, true))
		{
			popCircle(tempCircle, tempCircle.x, tempCircle.y);
			break;
		}
	}
}
BBS Signature

None

Calipe

Reply To Post Reply & Quote

Posted at: 9/12/08 04:37 AM

Calipe LIGHT LEVEL 30

Sign-Up: 02/28/04

Posts: 448

Added the variables for specifying the maximum initial velocities in the x and y coordinates for the particles; a slider could control these variables at run-time. Also, now there is a bitmap object as a background. I chose a bitmap as it is a lot better to work with pixels when regarding backgrounds. Would love to see some nice bitmap effects. ;) The default color is black, but it can be anything really.
Here is the code in its entirety:

/* AS3 Code Collab! <http://www.newgrounds.com/bbs/topic/966360>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * A copy of the GNU General Public License is available at:
 * <http://www.gnu.org/licenses/>.
 */

stage.frameRate = 30;
const CIRCLE_RADIUS_MIN:int = 25;
const CIRCLE_RADIUS_MAX:int = 50;
const CIRCLE_SPD:int = 7;
const CIRCLE_CREATION_DELAY:int = 500;
const GRAVITY:int = 5; //Gravity applied to particles ***Added by Calipe***
var particleVX:Number = 15; //Particle's max x velocity ***Added by Calipe***
var particleVY:Number = 50; //Particle's initial y velocity ***Added by Calipe***
var maxParticles:int = 10; //Max number of particles  ***Added by Calipe***
var maxCircles:int = 50;
var circles:Array = new Array(); //lets make a container so we can easily access the circles?
var bgColor:int = 0x000000; //Background Color


var circleCreationTimer:Timer = new Timer(CIRCLE_CREATION_DELAY, 0);
circleCreationTimer.addEventListener(TimerEvent.TIMER, createCircleEvent, false, 10, false);
circleCreationTimer.start();

//Creates and adds the background to the display list ***Added by Calipe***

var bg:Bitmap = new Bitmap(new BitmapData(stage.stageWidth, stage.stageHeight, false, bgColor));
addChild(bg);

function createCircleEvent(timerEvent:TimerEvent):void
{
	var newCircle:Sprite = createCircleSprite();
	newCircle.x = Math.random()*(stage.stageWidth - newCircle.width);
	newCircle.y = - newCircle.height;
	circles.push(newCircle); //Here we add the circles to the array
	
	newCircle.addEventListener(Event.ENTER_FRAME, onCircleEnterFrame, false, 5, true);
	newCircle.addEventListener(MouseEvent.MOUSE_OVER, mouseOverListener, false, 0, true); //Registers the circle for the mouse over event ***Added by Calipe***
	
	addChild(circles[circles.length - 1]);
	
}

// original content **PrettyMuchBryce** ( modified )
function onCircleEnterFrame(event:Event):void
{
	var currentCircle:Sprite = event.currentTarget as Sprite;
	currentCircle.y += CIRCLE_SPD;
	
	if ((currentCircle.y - currentCircle.height) > stage.stageHeight)
	{
		currentCircle.removeEventListener(Event.ENTER_FRAME, onCircleEnterFrame); // EXTREMELY IMPORTANT FOR GARBAGE COLLECTION
		removeChild(currentCircle);
		circles.splice(circles.indexOf(currentCircle), 1);
	}
}

function createCircleSprite():Sprite
{
	var radius:int = CIRCLE_RADIUS_MIN + Math.random()*(CIRCLE_RADIUS_MAX - CIRCLE_RADIUS_MIN);
	var tempCircle:Sprite = new Sprite();

	tempCircle.graphics.lineStyle();
	tempCircle.graphics.beginFill(Math.random()*0xFFFFFF);
	tempCircle.graphics.drawCircle(radius, radius, radius);
	tempCircle.graphics.endFill();

	return tempCircle;
}
// ** Ben-Fox ** random display object getter
function getRandomSprite(sourceArray:Array = null):Sprite {
     if (sourceArray == null) { //If no array reference is passed to the function...
          //Choose any child on the stage to return.
          return getChildAt(Math.floor(Math.random() * numChildren)) as Sprite;
     } else {
          //Return a reference from the specified array
          return sourceArray[Math.floor(Math.random() * sourceArray.length)] as Sprite; //Just in case
      }
}


//The event listener function that is triggered when the mouse over event is dipatched ***Added by Calipe***

function mouseOverListener(event:MouseEvent):void
{
	
	popCircle(Sprite(event.target), mouseX, mouseY);
}

// updated the circle pop, so mouse overs were not the only method for triggering them.  ** deadlock32 **
function popCircle(targetCircle:DisplayObject, centerX:Number, centerY:Number):void
{
	removeChild(targetCircle);
	circles.splice(circles.indexOf(targetCircle), 1);
	targetCircle.removeEventListener(Event.ENTER_FRAME, onCircleEnterFrame);
	createParticles(centerX, centerY);
}

//Creates the particles ***Added by Calipe***

function createParticles(centerX:Number, centerY:Number):void
{
	for (var i:int = 0; i < maxParticles; i++)
	{
		var particle:MovieClip = new MovieClip();
		particle.graphics.beginFill(Math.random() * 0xFFFFFF);
		particle.graphics.drawCircle(0, 0, Math.random() * 10 + 5);
		particle.vx = Math.random() * (particleVX*2) - (particleVX);
		particle.vy = Math.random() * -particleVY;
		particle.x = centerX;
		particle.y = centerY;
		particle.addEventListener(Event.ENTER_FRAME, particleEnterFrame, false, 0, true);
		addChild(particle);
	}
}

//Particles enter frame listener ***Added by Calipe***

function particleEnterFrame(event:Event):void
{

	
	var tempParticle:MovieClip = MovieClip(event.target);
	if ( tempParticle.y < stage.stageHeight)
	{
		checkIfParticlePopsCircle(tempParticle);
		
		tempParticle.vy += GRAVITY;
		tempParticle.x += tempParticle.vx;
		tempParticle.y += tempParticle.vy;
		
		
	}
	else
	{
		removeChild(tempParticle);
		tempParticle.removeEventListener(Event.ENTER_FRAME, particleEnterFrame, false);
	}
}


// added a function to check if a particle is touching another circle  
// by deadlock32
function checkIfParticlePopsCircle(targetParticle:DisplayObject):void
{
	var targetParticleRadius:Number = targetParticle.width * 0.5;
	for each(var tempCircle:DisplayObject in circles)
	{
		var circleRadius:Number = tempCircle.width * 0.5;
		var collisionDistanceMax:Number = targetParticleRadius + circleRadius;
		
		var distanceApart:Number = Point.distance(new Point(targetParticle.x, targetParticle.y), new Point(tempCircle.x, tempCircle.y));
		
		if(distanceApart <= collisionDistanceMax)
		{
			popCircle(tempCircle, tempCircle.x, tempCircle.y);
			break;
		}
		// the above was 100%... for some reason if you wanna figure out why go for it
		// I added the below to help compensate
		if(tempCircle.hitTestPoint(targetParticle.x, targetParticle.y, true))
		{
			popCircle(tempCircle, tempCircle.x, tempCircle.y);
			break;
		}
	}
}

None

Calipe

Reply To Post Reply & Quote

Posted at: 9/12/08 05:05 AM

Calipe LIGHT LEVEL 30

Sign-Up: 02/28/04

Posts: 448

Sorry for double posting but I made a few modifications to the previous entry regarding the "Popped" counter. Nothing too big, but it now uses a TextFormat object to set its formating. Also it keeps the counter in front of the balls. Here is the code:

/* AS3 Code Collab! <http://www.newgrounds.com/bbs/topic/966360>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * A copy of the GNU General Public License is available at:
 * <http://www.gnu.org/licenses/>.
 */

stage.frameRate = 30;
const CIRCLE_RADIUS_MIN:int = 25;
const CIRCLE_RADIUS_MAX:int = 50;
const CIRCLE_SPD:int = 7;
const CIRCLE_CREATION_DELAY:int = 500;
const GRAVITY:int = 5; //Gravity applied to particles ***Added by Calipe***
var particleVX:Number = 15; //Particle's max x velocity ***Added by Calipe***
var particleVY:Number = 50; //Particle's initial y velocity ***Added by Calipe***
var maxParticles:int = 10; //Max number of particles  ***Added by Calipe***
var maxCircles:int = 50;
var circles:Array = new Array(); //lets make a container so we can easily access the circles?
var bgColor:int = 0x000000; //Background Color


var circleCreationTimer:Timer = new Timer(CIRCLE_CREATION_DELAY, 0);
circleCreationTimer.addEventListener(TimerEvent.TIMER, createCircleEvent, false, 10, false);
circleCreationTimer.start();

//Creates and adds the background to the display list ***Added by Calipe***

var bg:Bitmap = new Bitmap(new BitmapData(stage.stageWidth, stage.stageHeight, false, bgColor));
addChild(bg);

var textFormat:TextFormat = new TextFormat();

//Modify with the desired format ***Added by Calipe***
with (textFormat)
{
	font = "Arial";
	size = "12";
	color = "0x0088FF";
	bold = true;
}

var poppedCircles:int = 0; //Circle Counter Startup (Kajenx waz hur :3)
var poppedCirclesCounter:TextField = new TextField;
addChild(poppedCirclesCounter);
poppedCirclesCounter.x = 10;
poppedCirclesCounter.y = 10;
poppedCirclesCounter.selectable = false;
poppedCirclesCounter.text = "Popped: 0";
poppedCirclesCounter.setTextFormat(textFormat);

function createCircleEvent(timerEvent:TimerEvent):void
{
	var newCircle:Sprite = createCircleSprite();
	newCircle.x = Math.random()*(stage.stageWidth - newCircle.width);
	newCircle.y = - newCircle.height;
	circles.push(newCircle); //Here we add the circles to the array
	
	newCircle.addEventListener(Event.ENTER_FRAME, onCircleEnterFrame, false, 5, true);
	newCircle.addEventListener(MouseEvent.MOUSE_OVER, mouseOverListener, false, 0, true); //Registers the circle for the mouse over event ***Added by Calipe***
	
	addChild(circles[circles.length - 1]);
	swapChildren(poppedCirclesCounter, circles[circles.length -1]); //Keeps the counter on the top of the balls
	
}

// original content **PrettyMuchBryce** ( modified )
function onCircleEnterFrame(event:Event):void
{
	var currentCircle:Sprite = event.currentTarget as Sprite;
	currentCircle.y += CIRCLE_SPD;
	
	if ((currentCircle.y - currentCircle.height) > stage.stageHeight)
	{
		currentCircle.removeEventListener(Event.ENTER_FRAME, onCircleEnterFrame); // EXTREMELY IMPORTANT FOR GARBAGE COLLECTION
		removeChild(currentCircle);
		circles.splice(circles.indexOf(currentCircle), 1);
	}
}

function createCircleSprite():Sprite
{
	var radius:int = CIRCLE_RADIUS_MIN + Math.random()*(CIRCLE_RADIUS_MAX - CIRCLE_RADIUS_MIN);
	var tempCircle:Sprite = new Sprite();

	tempCircle.graphics.lineStyle();
	tempCircle.graphics.beginFill(Math.random()*0xFFFFFF);
	tempCircle.graphics.drawCircle(radius, radius, radius);
	tempCircle.graphics.endFill();

	return tempCircle;
}
// ** Ben-Fox ** random display object getter
function getRandomSprite(sourceArray:Array = null):Sprite {
     if (sourceArray == null) { //If no array reference is passed to the function...
          //Choose any child on the stage to return.
          return getChildAt(Math.floor(Math.random() * numChildren)) as Sprite;
     } else {
          //Return a reference from the specified array
          return sourceArray[Math.floor(Math.random() * sourceArray.length)] as Sprite; //Just in case
      }
}


//The event listener function that is triggered when the mouse over event is dipatched ***Added by Calipe***

function mouseOverListener(event:MouseEvent):void
{
	
	popCircle(Sprite(event.target), mouseX, mouseY);
}

// updated the circle pop, so mouse overs were not the only method for triggering them.  ** deadlock32 **
function popCircle(targetCircle:DisplayObject, centerX:Number, centerY:Number):void
{
	// Count popped circles
	poppedCircles++;
	poppedCirclesCounter.replaceText(8, poppedCirclesCounter.length, String(poppedCircles)); //Be sure to change the first argument if the initial title ever changes

	removeChild(targetCircle);
	circles.splice(circles.indexOf(targetCircle), 1);
	targetCircle.removeEventListener(Event.ENTER_FRAME, onCircleEnterFrame);
	createParticles(centerX, centerY);
}

//Creates the particles ***Added by Calipe***

function createParticles(centerX:Number, centerY:Number):void
{
	for (var i:int = 0; i < maxParticles; i++)
	{
		var particle:MovieClip = new MovieClip();
		particle.graphics.beginFill(Math.random() * 0xFFFFFF);
		particle.graphics.drawCircle(0, 0, Math.random() * 10 + 5);
		particle.vx = Math.random() * (particleVX*2) - (particleVX);
		particle.vy = Math.random() * -particleVY;
		particle.x = centerX;
		particle.y = centerY;
		particle.addEventListener(Event.ENTER_FRAME, particleEnterFrame, false, 0, true);
		addChild(particle);
	}
}

//Particles enter frame listener ***Added by Calipe***

function particleEnterFrame(event:Event):void
{

	
	var tempParticle:MovieClip = MovieClip(event.target);
	if ( tempParticle.y < stage.stageHeight)
	{
		checkIfParticlePopsCircle(tempParticle);
		
		tempParticle.vy += GRAVITY;
		tempParticle.x += tempParticle.vx;
		tempParticle.y += tempParticle.vy;
		
		
	}
	else
	{
		removeChild(tempParticle);
		tempParticle.removeEventListener(Event.ENTER_FRAME, particleEnterFrame, false);
	}
}


// added a function to check if a particle is touching another circle  
// by deadlock32
function checkIfParticlePopsCircle(targetParticle:DisplayObject):void
{
	var targetParticleRadius:Number = targetParticle.width * 0.5;
	for each(var tempCircle:DisplayObject in circles)
	{
		var circleRadius:Number = tempCircle.width * 0.5;
		var collisionDistanceMax:Number = targetParticleRadius + circleRadius;
		
		var distanceApart:Number = Point.distance(new Point(targetParticle.x, targetParticle.y), new Point(tempCircle.x, tempCircle.y));
		
		if(distanceApart <= collisionDistanceMax)
		{
			popCircle(tempCircle, tempCircle.x, tempCircle.y);
			break;
		}
		// the above was 100%... for some reason if you wanna figure out why go for it
		// I added the below to help compensate
		if(tempCircle.hitTestPoint(targetParticle.x, targetParticle.y, true))
		{
			popCircle(tempCircle, tempCircle.x, tempCircle.y);
			break;
		}
	}
}

None

bornstar

Reply To Post Reply & Quote

Posted at: 9/12/08 06:07 AM

bornstar NEUTRAL LEVEL 02

Sign-Up: 01/02/08

Posts: 42

too bad i'm still using Flash 8 :-S


None

Ben-Fox

Reply To Post Reply & Quote

Posted at: 9/12/08 06:18 AM

Ben-Fox LIGHT LEVEL 07

Sign-Up: 12/27/03

Posts: 571

Since the project is getting long enough that running into char count limits per post is imminent, I broke the code into discrete sections. Perhaps the full code should be posted once per page, and only the appropriate section be posted when you update?

/* AS3 Code Collab! <http://www.newgrounds.com/bbs/topic/966360>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * A copy of the GNU General Public License is available at:
 * <http://www.gnu.org/licenses/>.
 */

// === BEGIN INITIALIZATION ROUTINES ===
stage.frameRate = 30;
const CIRCLE_RADIUS_MIN:int = 25;
const CIRCLE_RADIUS_MAX:int = 50;
const CIRCLE_SPD:int = 7;
const CIRCLE_CREATION_DELAY:int = 500;
const GRAVITY:int = 5; //Gravity applied to particles ***Added by Calipe***
var particleVX:Number = 15; //Particle's max x velocity ***Added by Calipe***
var particleVY:Number = 50; //Particle's initial y velocity ***Added by Calipe***
var maxParticles:int = 10; //Max number of particles  ***Added by Calipe***
var maxCircles:int = 50;
var circles:Array = new Array(); //lets make a container so we can easily access the circles?
var bgColor:int = 0x000000; //Background Color


var circleCreationTimer:Timer = new Timer(CIRCLE_CREATION_DELAY, 0);
circleCreationTimer.addEventListener(TimerEvent.TIMER, createCircleEvent, false, 10, false);
circleCreationTimer.start();

//Creates and adds the background to the display list ***Added by Calipe***

var bg:Bitmap = new Bitmap(new BitmapData(stage.stageWidth, stage.stageHeight, false, bgColor));
addChild(bg);

var textFormat:TextFormat = new TextFormat();

//Modify with the desired format ***Added by Calipe***
with (textFormat)
{
	font = "Arial";
	size = "12";
	color = "0x0088FF";
	bold = true;
}

var poppedCircles:int = 0; //Circle Counter Startup (Kajenx waz hur :3)
var poppedCirclesCounter:TextField = new TextField;
addChild(poppedCirclesCounter);
poppedCirclesCounter.x = 10;
poppedCirclesCounter.y = 10;
poppedCirclesCounter.selectable = false;
poppedCirclesCounter.text = "Popped: 0";
poppedCirclesCounter.setTextFormat(textFormat);

//===END INITIALIZATION ROUTINES ===

//===BEGIN EVENT HANDLERS ===
function createCircleEvent(timerEvent:TimerEvent):void
{
	var newCircle:Sprite = createCircleSprite();
	newCircle.x = Math.random()*(stage.stageWidth - newCircle.width);
	newCircle.y = - newCircle.height;
	circles.push(newCircle); //Here we add the circles to the array
	
	newCircle.addEventListener(Event.ENTER_FRAME, onCircleEnterFrame, false, 5, true);
	newCircle.addEventListener(MouseEvent.MOUSE_OVER, mouseOverListener, false, 0, true); //Registers the circle for the mouse over event ***Added by Calipe***
	
	addChild(circles[circles.length - 1]);
	swapChildren(poppedCirclesCounter, circles[circles.length -1]); //Keeps the counter on the top of the balls
	
}

// original content **PrettyMuchBryce** ( modified )
function onCircleEnterFrame(event:Event):void
{
	var currentCircle:Sprite = event.currentTarget as Sprite;
	currentCircle.y += CIRCLE_SPD;
	
	if ((currentCircle.y - currentCircle.height) > stage.stageHeight)
	{
		currentCircle.removeEventListener(Event.ENTER_FRAME, onCircleEnterFrame); // EXTREMELY IMPORTANT FOR GARBAGE COLLECTION
		removeChild(currentCircle);
		circles.splice(circles.indexOf(currentCircle), 1);
	}
}
//The event listener function that is triggered when the mouse over event is dipatched ***Added by Calipe***
function mouseOverListener(event:MouseEvent):void
{
	
	popCircle(Sprite(event.target), mouseX, mouseY);
}

//Particles enter frame listener ***Added by Calipe***

function particleEnterFrame(event:Event):void
{

	
	var tempParticle:MovieClip = MovieClip(event.target);
	if ( tempParticle.y < stage.stageHeight)
	{
		checkIfParticlePopsCircle(tempParticle);
		
		tempParticle.vy += GRAVITY;
		tempParticle.x += tempParticle.vx;
		tempParticle.y += tempParticle.vy;
		
		
	}
	else
	{
		removeChild(tempParticle);
		tempParticle.removeEventListener(Event.ENTER_FRAME, particleEnterFrame, false);
	}
}

//===END EVENT HANDLERS ===

//===BEGIN GENERAL FUNCTIONS===
function createCircleSprite():Sprite
{
	var radius:int = CIRCLE_RADIUS_MIN + Math.random()*(CIRCLE_RADIUS_MAX - CIRCLE_RADIUS_MIN);
	var tempCircle:Sprite = new Sprite();

	tempCircle.graphics.lineStyle();
	tempCircle.graphics.beginFill(Math.random()*0xFFFFFF);
	tempCircle.graphics.drawCircle(radius, radius, radius);
	tempCircle.graphics.endFill();

	return tempCircle;
}
// ** Ben-Fox ** random display object getter
function getRandomSprite(sourceArray:Array = null):Sprite {
     if (sourceArray == null) { //If no array reference is passed to the function...
          //Choose any child on the stage to return.
          return getChildAt(Math.floor(Math.random() * numChildren)) as Sprite;
     } else {
          //Return a reference from the specified array
          return sourceArray[Math.floor(Math.random() * sourceArray.length)] as Sprite; //Just in case
      }
}

// updated the circle pop, so mouse overs were not the only method for triggering them.  ** deadlock32 **
function popCircle(targetCircle:DisplayObject, centerX:Number, centerY:Number):void
{
	// Count popped circles
	poppedCircles++;
	poppedCirclesCounter.replaceText(8, poppedCirclesCounter.length, String(poppedCircles)); //Be sure to change the first argument if the initial title ever changes

	removeChild(targetCircle);
	circles.splice(circles.indexOf(targetCircle), 1);
	targetCircle.removeEventListener(Event.ENTER_FRAME, onCircleEnterFrame);
	createParticles(centerX, centerY);
}

//Creates the particles ***Added by Calipe***

function createParticles(centerX:Number, centerY:Number):void
{
	for (var i:int = 0; i < maxParticles; i++)
	{
		var particle:MovieClip = new MovieClip();
		particle.graphics.beginFill(Math.random() * 0xFFFFFF);
		particle.graphics.drawCircle(0, 0, Math.random() * 10 + 5);
		particle.vx = Math.random() * (particleVX*2) - (particleVX);
		particle.vy = Math.random() * -particleVY;
		particle.x = centerX;
		particle.y = centerY;
		particle.addEventListener(Event.ENTER_FRAME, particleEnterFrame, false, 0, true);
		addChild(particle);
	}
}

// added a function to check if a particle is touching another circle  
// by deadlock32
function checkIfParticlePopsCircle(targetParticle:DisplayObject):void
{
	var targetParticleRadius:Number = targetParticle.width * 0.5;
	for each(var tempCircle:DisplayObject in circles)
	{
		var circleRadius:Number = tempCircle.width * 0.5;
		var collisionDistanceMax:Number = targetParticleRadius + circleRadius;
		
		var distanceApart:Number = Point.distance(new Point(targetParticle.x, targetParticle.y), new Point(tempCircle.x, tempCircle.y));
		
		if(distanceApart <= collisionDistanceMax)
		{
			popCircle(tempCircle, tempCircle.x, tempCircle.y);
			break;
		}
		// the above was 100%... for some reason if you wanna figure out why go for it
		// I added the below to help compensate
		if(tempCircle.hitTestPoint(targetParticle.x, targetParticle.y, true))
		{
			popCircle(tempCircle, tempCircle.x, tempCircle.y);
			break;
		}
	}
}
// === END GENERAL FUNCTIONS ===

Sad

Jaye19

Reply To Post Reply & Quote

Posted at: 9/12/08 08:32 AM

Jaye19 LIGHT LEVEL 13

Sign-Up: 04/07/08

Posts: 606

I really wanna join this but I just really do not get it

Godia meia of ultimia omega andio alpha areia javka

BBS Signature

Happy

Jaye19

Reply To Post Reply & Quote

Posted at: 9/12/08 08:44 AM

Jaye19 LIGHT LEVEL 13

Sign-Up: 04/07/08

Posts: 606

Wait a minute a do think I get it. I tried to do at least something for you guys I added a right-click menu....

//Hi Jaye19 added this :)

var mymenu:ContextMenu= new ContextMenu();
mymenu.hideBuiltInItems();
var txt:String='The AS3 Code Collab *Line By Line*';
var item:ContextMenuItem= new ContextMenuItem(txt);
mymenu.customItems.push(item);
item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,item_select);
function item_select(e:ContextMenuEvent):void
{
var url:String='newgrounds.com';
//Here, just do anything here guys
var site:URLRequest=new URLRequest(url);
navigateToURL(site);
}
this.contextMenu=mymenu;

Godia meia of ultimia omega andio alpha areia javka

BBS Signature

None

hesselbom

Reply To Post Reply & Quote

Posted at: 9/12/08 09:14 AM

hesselbom NEUTRAL LEVEL 01

Sign-Up: 07/19/08

Posts: 309

At 9/12/08 06:18 AM, Ben-Fox wrote: Since the project is getting long enough that running into char count limits per post is imminent, I broke the code into discrete sections. Perhaps the full code should be posted once per page, and only the appropriate section be posted when you update?

This is why most people use classes.

Who still codes on frames in ActionScript 3? :s


None

Calipe

Reply To Post Reply & Quote

Posted at: 9/12/08 09:23 AM

Calipe LIGHT LEVEL 30

Sign-Up: 02/28/04

Posts: 448

At 9/12/08 09:14 AM, hesselbom wrote:
At 9/12/08 06:18 AM, Ben-Fox wrote: Since the project is getting long enough that running into char count limits per post is imminent, I broke the code into discrete sections. Perhaps the full code should be posted once per page, and only the appropriate section be posted when you update?
This is why most people use classes.

Who still codes on frames in ActionScript 3? :s

We are trying to see how far we go without using classes. Of course it would be easier, more organized, and a lot smarter to use Object Oriented Programming, BUT in the spirit of newgrounds we are trying to take it as far as we can take it.


None

deadlock32

Reply To Post Reply & Quote

Posted at: 9/12/08 12:04 PM

deadlock32 NEUTRAL LEVEL 18

Sign-Up: 04/28/01

Posts: 2,502

At 9/12/08 09:14 AM, hesselbom wrote:
At 9/12/08 06:18 AM, Ben-Fox wrote: Since the project is getting long enough that running into char count limits per post is imminent, I broke the code into discrete sections. Perhaps the full code should be posted once per page, and only the appropriate section be posted when you update?
This is why most people use classes.

Who still codes on frames in ActionScript 3? :s

yeah I started thinking about this yesterday, I wrote about it here:

http://asftw.typepad.com/actionscript_fo r_the_win/2008/09/no-as3-classes.html


None

Ben-Fox

Reply To Post Reply & Quote

Posted at: 9/12/08 04:49 PM

Ben-Fox LIGHT LEVEL 07

Sign-Up: 12/27/03

Posts: 571

You know, we could explicitly import the dozen or so flash.* packages currently needed to make the project work and do the whole thing as a single package file. The functional result is unchanged; it's still a huge mass of code in a single file that's 1 frame and compile to run, but we get the benefits of being able to define classes and the like as we need them.

On the other hand, the limitations and challenges involved in doing it this way is actually kinda fun to work with (and around!)...so I dunno.


All times are Eastern Standard Time (GMT -5) | Current Time: 02:26 PM

<< Back

This topic is 2 pages long. [ 1 | 2 ]

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!