# 8 sides?

**URL:** <https://forum.kirupa.com/t/8-sides/19178>\
**Category:** flash\
**Created:** [April 25, 2003, 1:00am UTC](https://forum.kirupa.com/t/8-sides/19178 "2003-04-25T01:00:34Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![dexa\_007](https://avatars.discourse-cdn.com/v4/letter/d/f17d59/32.png) [@dexa\_007](https://forum.kirupa.com/u/dexa_007)\
**Post date:** [April 25, 2003, 1:00am UTC](https://forum.kirupa.com/t/8-sides/19178/1 "2003-04-25T01:00:34Z")

</div>

Great Scottish Terriors! How do I draw an **octagon** in Flash?

Powerful thanks!

D

---

<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:** [April 25, 2003, 1:11am UTC](https://forum.kirupa.com/t/8-sides/19178/2 "2003-04-25T01:11:26Z")

</div>

What do you mean?

---

<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:** [April 25, 2003, 1:12am UTC](https://forum.kirupa.com/t/8-sides/19178/3 "2003-04-25T01:12:55Z")

</div>

```auto
MovieClip.prototype.drawOctagon = function(r, x, y) {
	this.lineStyle(1, 0, 100);
	this.moveTo(x+r, y);
	for (var a = 45; a<=360; a += 45) {
		var toX = r*Math.cos(a*Math.PI/180);
		var toY = r*Math.sin(a*Math.PI/180);
		this.lineTo(toX+x, toY+y);
	}
};
this.createEmptyMovieClip("octagon", 0).drawOctagon(80, 100, 100);

```

like that? =)

---

<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:** [April 25, 2003, 1:49am UTC](https://forum.kirupa.com/t/8-sides/19178/4 "2003-04-25T01:49:01Z")

</div>

Wow, that AS looks smooth! But it’s going to produce a 3-dimensional, right??? I’m just looking to draw a simple “stop sign”.

Thanks for the script though. I’ll put it in my bag of good things.

🙂

---

<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:** [April 25, 2003, 2:02am UTC](https://forum.kirupa.com/t/8-sides/19178/5 "2003-04-25T02:02:28Z")

</div>

nope… it will draw a simple 2d octagon.

```auto
MovieClip.prototype.stopSign = function(r, x, y) {
	this.lineStyle(2, 0, 100);
	this.beginFill(0xFFCC00, 100);
	this.moveTo(r, 0);
	for (this.a = 0; this.a<=360; this.a += 45) {
		this.x = r*Math.cos(this.a*Math.PI/180);
		this.y = r*Math.sin(this.a*Math.PI/180);
		this.lineTo(this.x, this.y);
	}
	this.endFill();
	this.createTextField("myStop", 0, 0, 0, 0, 0);
	this.myFormat = new TextFormat("Verdana", 12, 0, 1, 0, 0, 0, 0, "left", 0, 0, 0, 0);
	this.myStop.setNewTextFormat(this.myFormat);
	this.myStop.text = "Stop";
	this.myStop.autoSize = true;
	this.myStop._x = -this.myStop._width/2;
	this.myStop._y = -this.myStop._height/2;
	this._x = x;
	this._y = y;
};
this.createEmptyMovieClip("myStopSign", 0).stopSign(40, 100, 100);

```

i’m bored… 😛

---

<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:** [April 25, 2003, 2:08am UTC](https://forum.kirupa.com/t/8-sides/19178/6 "2003-04-25T02:08:45Z")

</div>

Sweet!

I’m no longer bored. :ub:

---

<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:** [April 25, 2003, 2:10am UTC](https://forum.kirupa.com/t/8-sides/19178/7 "2003-04-25T02:10:10Z")

</div>

😛 😉

---

<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:** [April 25, 2003, 9:29pm UTC](https://forum.kirupa.com/t/8-sides/19178/8 "2003-04-25T21:29:10Z")

</div>

Cool, makes this look even better, cause this is what I was thinking:

1. Make a square, turn it 45 degrees
2. Make another square, plop it on top
3. Select and remove the points
4. That’ll be a trout slap for me :trout:

Hmmm.  
I’ll stick to Paint, sorry guys…  
(-:

---

<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:** [April 25, 2003, 9:34pm UTC](https://forum.kirupa.com/t/8-sides/19178/9 "2003-04-25T21:34:07Z")

</div>

1. one more slap. :trout:

😛 j/k 😉

---

<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:** [April 25, 2003, 9:43pm UTC](https://forum.kirupa.com/t/8-sides/19178/10 "2003-04-25T21:43:11Z")

</div>

Thunder …

Hmm, that ain’t lookin’ like no stop sign, bro. :crazy: Nice swimmer suit though. :sure:

D

---

<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:** [April 26, 2003, 9:53am UTC](https://forum.kirupa.com/t/8-sides/19178/11 "2003-04-26T09:53:17Z")

</div>

What are you talking about? I think it does! Sure, it’s not as fancy, or neat, or cool, or…crap. Well, this is what I ment. Trout slap me if you feel the need; I’m okay with that…  
(-:

---

<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:** [April 26, 2003, 3:55pm UTC](https://forum.kirupa.com/t/8-sides/19178/12 "2003-04-26T15:55:08Z")

</div>

Wow! Nice work. That’s definitely a STOP SIGN.

Nice touch with the word STOP in the middle. (-: Most authentic.

Thanks!

D

---

<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:** [April 27, 2003, 12:20am UTC](https://forum.kirupa.com/t/8-sides/19178/13 "2003-04-27T00:20:30Z")

</div>

Thank You!!! Thank You!!!  
Allright, I’ll stop now.
