# AS Class

**URL:** <https://forum.kirupa.com/t/as-class/214087>\
**Category:** flash\
**Created:** [January 25, 2007, 2:25pm UTC](https://forum.kirupa.com/t/as-class/214087 "2007-01-25T14:25:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![randomagain](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@randomagain](https://forum.kirupa.com/u/randomagain)\
**Post date:** [January 25, 2007, 2:25pm UTC](https://forum.kirupa.com/t/as-class/214087/1 "2007-01-25T14:25:59Z")

</div>

Hi

I have managed to create a method which changes the colour of a line

I now…need a seperate method which changes the thickness of the line, however whatever I try messes up

thanks for any ideas.

```auto

class SimpleDraw {
 private var drawing_mc:MovieClip;
 private var penDown:Boolean;
 public function SimpleDraw(timeline:MovieClip, depth:Number) {
  drawing_mc = timeline.createEmptyMovieClip("drawingClip"+depth, depth);
  penDown = false;
  Mouse.addListener(this);
  drawing_mc.lineStyle(1, 0x000000, 100);
 }
** public function setColour(col:Number):Void {
  // thickness, colour, alpha
  drawing_mc.lineStyle(1, col, 100);
 }**
** [COLOR=red]public function setThick(l:Number):Void {
  // thickness, colour, alpha
  drawing_mc.lineStyle(l, c, 100);
 }[/COLOR]**
 public function onMouseDown():Void {
  drawing_mc.moveTo(_xmouse, _ymouse);
  penDown = true;
 }
 public function onMouseUp():Void {
  //drawing_mc.moveTo(_xmouse, _ymouse);
  penDown = false;
 }
 public function onMouseMove():Void {
  // place stuff inside class function
  if (penDown == true) {
   drawing_mc.lineTo(_xmouse, _ymouse);
  }
 }
}

```
