# The AS Battle Game

**URL:** <https://forum.kirupa.com/t/the-as-battle-game/33453>\
**Category:** Uncategorized\
**Created:** [October 19, 2003, 7:01pm UTC](https://forum.kirupa.com/t/the-as-battle-game/33453 "2003-10-19T19:01:21Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 24, 2003, 9:17pm UTC](https://forum.kirupa.com/t/the-as-battle-game/33453/21 "2003-10-24T21:17:15Z")

</div>

what exactly is to be done?  
shall we redo the rotation (using the mouse) of the dns ?  
add the random colors to background and dns?  
redo the complete footer???  
or just something specific like the 3d rotation?  
(I guess here is somebody who want’s us to rewrite his footer in pure as? :h: 😃 😃

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 25, 2003, 1:29pm UTC](https://forum.kirupa.com/t/the-as-battle-game/33453/22 "2003-10-25T13:29:02Z")

</div>

redo the rotation (using the mouse) of the dns  
add the random colors to background and dns?  
and the number thing

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 25, 2003, 5:11pm UTC](https://forum.kirupa.com/t/the-as-battle-game/33453/23 "2003-10-25T17:11:22Z")

</div>

What kind of battle is this???

Anyway, Voetsjoeba, I really like what you did :love:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 25, 2003, 5:23pm UTC](https://forum.kirupa.com/t/the-as-battle-game/33453/24 "2003-10-25T17:23:14Z")

</div>

Yeah, I’m getting confused too.

Thanks pom, I really like what you did too :love:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 25, 2003, 5:49pm UTC](https://forum.kirupa.com/t/the-as-battle-game/33453/25 "2003-10-25T17:49:43Z")

</div>

No I liked what you did MORE!! 😱

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 25, 2003, 5:58pm UTC](https://forum.kirupa.com/t/the-as-battle-game/33453/26 "2003-10-25T17:58:24Z")

</div>

No, we love both’s equally 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 25, 2003, 6:05pm UTC](https://forum.kirupa.com/t/the-as-battle-game/33453/27 "2003-10-25T18:05:19Z")

</div>

haha, I like mine most 😉

[size=1]just a joke[/size]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 25, 2003, 6:16pm UTC](https://forum.kirupa.com/t/the-as-battle-game/33453/28 "2003-10-25T18:16:50Z")

</div>

The reason why McGiver won is because his effect is the exact effect I was looking for. This isn’t really a battle its a game

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 25, 2003, 7:49pm UTC](https://forum.kirupa.com/t/the-as-battle-game/33453/29 "2003-10-25T19:49:30Z")

</div>

:jag: :cyclops: :gas:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 25, 2003, 8:51pm UTC](https://forum.kirupa.com/t/the-as-battle-game/33453/30 "2003-10-25T20:51:10Z")

</div>

i win i win 😃

```auto

MovieClip.prototype.drawCircle = function(x, y, theColor) {
	this.moveTo(Math.cos(0)*5+x, Math.sin(0)*5+y);
	this.lineStyle(0, 0x000000, 0);
	this.beginFill(theColor, 100);
	for (var radians = 0; radians<Math.PI*2; radians += Math.PI/180) {
		this.lineTo(Math.cos(radians)*5+x, Math.sin(radians)*5+y);
	}
	this.endFill();
};
MovieClip.prototype.makeThing = function(num) {
	this.theColor = Math.round(Math.random()*255);
	this.drawCircle(-25, 0, this.theColor);
	this.lineStyle(3, this.theColor, 100);
	this.moveTo(-25, 0);
	this.lineTo(25, 0);
	this.drawCircle(25, 0, this.theColor);
	this._x = 10*num;
	this._y = 100;
	this._rotation = 20*num;
	this._xscale = this._yscale=10*num;
	this._alpha = 10+(90/_root.count)*num;
	this.onEnterFrame = function() {
		this._rotation += (_root._xmouse-300)/50;
	};
};
_root.createTextField("input_txt", 0, 290, 80, 20, 20);
input_txt.type = "input";
input_txt.border = true;
input_txt.maxChars = 2;
input_txt.restrict = "0-9";
_root.createEmptyMovieClip("button_mc", 1);
button_mc._x = 290;
button_mc._y = 100;
button_mc.createTextField("text_txt", 0, -45, 0, 100, 20);
button_mc.text_txt.text = "Go: A numder 5-50";
button_mc.text_txt.selectable = false;
button_mc.onPress = function() {
	if (Number(input_txt.text)>=5 && Number(input_txt.text)<=50) {
		_root.count = Number(input_txt.text);
		for (var j = 0; j<_root.count; j++) {
			_root.createEmptyMovieClip("thing"+j, j);
			_root["thing"+j].makeThing(j);
		}
	}
};

```

😃

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 25, 2003, 9:41pm UTC](https://forum.kirupa.com/t/the-as-battle-game/33453/31 "2003-10-25T21:41:24Z")

</div>

nice one @ master64.  
I think you will have to add some random cycling colors

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 26, 2003, 6:04am UTC](https://forum.kirupa.com/t/the-as-battle-game/33453/32 "2003-10-26T06:04:25Z")

</div>

Wowow, what is this thread about ? Is this a battle or a game ? Is this about DNA or bouncing ?? :h:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 26, 2003, 11:08am UTC](https://forum.kirupa.com/t/the-as-battle-game/33453/33 "2003-10-26T11:08:43Z")

</div>

its about bouncing DNA 😛  
:h:

[size=1]well i dunno thay say make DNA so i make DNA 😃 [/size]

@McGiver I will be add the color thing soon

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 26, 2003, 11:23am UTC](https://forum.kirupa.com/t/the-as-battle-game/33453/34 "2003-10-26T11:23:41Z")

</div>

Lol 😛

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 26, 2003, 4:35pm UTC](https://forum.kirupa.com/t/the-as-battle-game/33453/35 "2003-10-26T16:35:15Z")

</div>

its got a bit messy 😛

```auto

MovieClip.prototype.drawCircle = function(x, y) {
	this.moveTo(Math.cos(0)*5+x, Math.sin(0)*5+y);
	this.lineStyle(0, 0x000000, 0);
	this.beginFill(0x000000, 100);
	for (var radians = 0; radians<Math.PI*2; radians += Math.PI/180) {
		this.lineTo(Math.cos(radians)*5+x, Math.sin(radians)*5+y);
	}
	this.endFill();
};
MovieClip.prototype.makeThing = function(num) {
	this.drawCircle(-25, 0);
	this.lineStyle(3, 0x000000, 100);
	this.moveTo(-25, 0);
	this.lineTo(25, 0);
	this.drawCircle(25, 0);
	this._x = 10*num;
	this._y = 100;
	this._rotation = 20*num;
	this._xscale = this._yscale=10*num;
	this._alpha = 10+(90/_root.count)*num;
	this.num = num;
	this.onEnterFrame = function() {
		this._rotation += (_root._xmouse-300)/50;
		var red = 127*(1+Math.sin(this.num/10+(this.red += incr_red)));
		var green = 127*(1+Math.sin(this.num/10+(this.green += incr_green)));
		var blue = 127*(1+Math.sin(this.num/10+(this.blue += incr_blue)));
		var colRand = red << 16 | green << 8 | blue;
		var c = new Color(this);
		c.setRGB(colRand);
	};
};
incr_red = Math.random()/10;
incr_green = Math.random()/10;
incr_blue = Math.random()/10;
_root.createTextField("input_txt", 0, 290, 80, 20, 20);
input_txt.type = "input";
input_txt.border = true;
input_txt.maxChars = 2;
input_txt.restrict = "0-9";
_root.createEmptyMovieClip("button_mc", 1);
button_mc._x = 290;
button_mc._y = 100;
button_mc.createTextField("text_txt", 0, -45, 0, 100, 20);
button_mc.text_txt.text = "Go: A numder 5-50";
button_mc.text_txt.selectable = false;
button_mc.onPress = function() {
	if (Number(input_txt.text)>=5 && Number(input_txt.text)<=50) {
		_root.count = Number(input_txt.text);
		for (var j = 1; j<_root.count+1; j++) {
			_root.createEmptyMovieClip("thing"+j, j);
			_root["thing"+j].makeThing(j);
		}
		_root.createEmptyMovieClip("background_mc", 0);
		var red = Math.round(Math.random()*255);
		var green = Math.round(Math.random()*255);
		var blue = Math.round(Math.random()*255);
		var colRand = red << 16 | green << 8 | blue;
		background_mc.beginFill(colRand, 100);
		background_mc.lineTo(Stage.width, 0);
		background_mc.lineTo(Stage.width, Stage.height);
		background_mc.lineTo(0, Stage.height);
		background_mc.endFill();
	}
};

```

😃

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 27, 2003, 7:45pm UTC](https://forum.kirupa.com/t/the-as-battle-game/33453/36 "2003-10-27T19:45:01Z")

</div>

Ok seeing no one is saying I win ☹  
**I** will say I win :bad: and call the next challenge

Challenge 3

… some thing I can make too!?! :sleep: …  
A man that you can move around with your keybord/mouse. Then there is also a thing moving around randomly and avoiding the man a bit. Where the man hits the thing you win…a kind of hunt thing.

So will that do? :}

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 27, 2003, 9:33pm UTC](https://forum.kirupa.com/t/the-as-battle-game/33453/37 "2003-10-27T21:33:33Z")

</div>

Created this quickly, for myself actually, to see if I could do something like that. The arrow isn’t too smart though 😛

```auto

d = 0;
dotsize = 10;
boundary = {x:350, y:250, w:350, h:350};
Math.toDegrees = function(radians) {
	return radians*180/Math.PI;
};
MovieClip.prototype.drawBoundary = function() {
	var k = boundary;
	var b = dotsize/2;
	with (this) {
		lineStyle(1, 0x000000, 100);
		moveTo(-k.w/2-b, -k.h/2-b);
		lineTo(k.w/2+b, -k.h/2-b);
		lineTo(k.w/2+b, k.h/2+b);
		lineTo(-k.w/2-b, k.h/2+b);
		lineTo(-k.w/2-b, -k.h/2-b);
		_x=k.x, _y=k.y;
	}
};
MovieClip.prototype.makeLine = function(l, x, y) {
	with (this) {
		lineStyle(1, 0x000000, 100);
		lineTo(l, 0);
		lineTo(l/2+l/4, l/4);
		moveTo(l, 0);
		lineTo(l/2+l/4, -l/4);
		_x=x, _y=y;
	}
};
MovieClip.prototype.makeGuy = function(x, y) {
	Key.addListener(this);
	with (this) {
		lineStyle(dotsize, 0x000000, 50);
		lineTo(.15, .45);
		lineStyle(1, 0x000000, 100);
		_x=x, _y=y;
	}
};
this.createTextField("win", d++, boundary.x-20, boundary.y, 70, 20);
this.createEmptyMovieClip("run", d++).makeLine(10, 350, 250);
this.createEmptyMovieClip("guy", d++).makeGuy(400, 260);
this.createEmptyMovieClip("boundaryLines", d++).drawBoundary();
guy.onEnterFrame = function() {
	//guy.onKeyDown = function() {
	if (Key.isDown(Key.UP) && this._y-dotsize/2>boundary.y-boundary.h/2) {
		this._y -= dotsize;
	}
	if (Key.isDown(Key.DOWN) && this._y+dotsize/2<boundary.y+boundary.h/2) {
		this._y += dotsize;
	}
	if (Key.isDown(Key.LEFT) && this._x-dotsize/2>boundary.x-boundary.w/2) {
		this._x -= dotsize;
	}
	if (Key.isDown(Key.RIGHT) && this._x+dotsize/2<boundary.x+boundary.w/2) {
		this._x += dotsize;
	}
};
run.onEnterFrame = function() {
	if (guy._x<boundary.x) {
		if (this._x+this._width+dotsize/2<boundary.x+boundary.w/2) {
			this._x += dotsize*1.5;
		}
	} else {
		if (this._x-dotsize/2>boundary.x-boundary.w/2) {
			this._x -= dotsize*1.5;
		}
	}
	if (guy._y<boundary.y) {
		if (this._y+this._height+dotsize/2<boundary.y+boundary.h/2) {
			this._y += dotsize*1.5;
		}
	} else {
		if (this._y-dotsize/2>boundary.y-boundary.h/2) {
			this._y -= dotsize*1.5;
		}
	}
	if (this.hitTest(guy)) {
		delete this.onEnterFrame;
		win.text = "You win !";
	}
};

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 27, 2003, 9:37pm UTC](https://forum.kirupa.com/t/the-as-battle-game/33453/38 "2003-10-27T21:37:53Z")

</div>

:!: your fast :cool:

ok you win your turn 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 27, 2003, 9:41pm UTC](https://forum.kirupa.com/t/the-as-battle-game/33453/39 "2003-10-27T21:41:46Z")

</div>

I want you guys to make some too so I can learn 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 27, 2003, 9:45pm UTC](https://forum.kirupa.com/t/the-as-battle-game/33453/40 "2003-10-27T21:45:02Z")

</div>

ok but not now am going to bed 😛

I need my sleep :sleep:

[Previous page](https://forum.kirupa.com/t/the-as-battle-game/33453.md?page=1)

[Next page](https://forum.kirupa.com/t/the-as-battle-game/33453.md?page=3)
