# Drawing code problem

**URL:** <https://forum.kirupa.com/t/drawing-code-problem/230860>\
**Category:** flash\
**Created:** [June 29, 2007, 2:31pm UTC](https://forum.kirupa.com/t/drawing-code-problem/230860 "2007-06-29T14:31:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Papaprime](https://avatars.discourse-cdn.com/v4/letter/p/54ee81/32.png) [@Papaprime](https://forum.kirupa.com/u/Papaprime)\
**Post date:** [June 29, 2007, 2:31pm UTC](https://forum.kirupa.com/t/drawing-code-problem/230860/1 "2007-06-29T14:31:29Z")

</div>

I’ve set up a simple drawing page here:

[http://www.carlsonmedia.tv/drawing.html](http://www.carlsonmedia.tv/drawing.html)

for some reason, drawing left to right on the stage works fine. But right to left won’t work.

here’s the code action script 2.0 out of Flash CS3 pro:

> lineThickness = 0;  
> selectedColor = “0x993333”;  
> \_root.onMouseDown = startDrawing;  
> \_root.onMouseUp = stopDrawing;  
> function startDrawing() {  
> if (\_xmouse\<455) {  
> \_root.lineStyle(lineThickness, selectedColor);  
> \_root.moveTo(\_root.\_xmouse, \_root.\_ymouse);  
> \_root.onMouseMove = drawLine;  
> }  
> }  
> function drawLine() {  
> \_root.lineTo(this.\_xmouse, this.\_ymouse);  
> }  
> function stopDrawing() {  
> delete this.onMouseMove;  
> }  
> line0.onPress = function() {  
> lineThickness = 0;  
> };  
> line3.onPress = function() {  
> lineThickness = 3;  
> };  
> line6.onPress = function() {  
> lineThickness = 6;  
> };  
> colorRed.onPress = function() {  
> selectedColor = “0x993333”;  
> };  
> colorGreen.onPress = function() {  
> selectedColor = “0x000000”;  
> };

also, if anyone could clue me in on where I can set the alpha levels for the drawing (what the code is and where it goes)
