Kieran Y5 8 Junior Poster

Hi,
I am working on a way to draw a graph with AS3. I have just put my code into different classes. I have a function that draws the graph axis but it doesn't seem to work properly. You will see what I mean in a min.

public function draw_axis():void
{
var container:Sprite  = new Sprite();

container.graphics.lineStyle(1, 0x9C9C9E);
container.graphics.moveTo(paddingLeft-1, paddingBottom); // This is the problem
container.graphics.lineTo(paddingLeft-1, graphHeight);
container.graphics.lineTo(graphWidth-paddingRight, graphHeight);

addChild(container);
}

From what I can work out, the graphics.moveTo() function only 'Moves' to paddingLeft-1 and not paddingBottom.

Example 2:

container.graphics.moveTo(50, 50);

This does the same thing. It acts like moveTo(50, 0) and not moveTo(50, 50)

I hope you understand. Please help!

Kieran :(