...

View Full Version : Wrong line height



neo_philiac
05-07-2008, 09:28 PM
Hello I am having a simple problem





var rectHeight = 37;

var rectWidth = 37;

tmp_big.lineStyle(rectWidth,color_tmp,100,true,"none","square", 1);
tmp_big.moveTo(0, (rectHeight));
tmp_big.lineTo(0, (-(rectHeight)));
tmp_big._x = (Stage.width-1280)+ 640; // Just trying to put the shape in a certain position
tmp_big._y = Stage.height/2; // Change registration point



The width is perfect when i draw the line but the height is 3 times 37. What am i doing wrong?

gnomeontherun
05-12-2008, 04:36 AM
I think it has to do with your .lineTo.

What if

tmp_big.moveTo(0, (rectHeight / 2));
tmp_big.lineTo(0, (-(rectHeight / 2)));
Other wise your line is going 37 px above the origin and also 37 below I think.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum