moveTo, lineTo

hai guys,:slight_smile:

i m just trying to draw a square using “moveTo” and “lineTo”, but i m not able to understand the parameters of this command, i.e , how give the x value and y value, can any body clearly explain how to draw a sqaure using these command

thx
maggi

imagine that there is a hidden pencil which can be moved to any place by moveTo and a line can be drawn between 2 points with it by using lineTo.
first you need to move the pencil to the first corner of the square.
e.g. line.moveTo(100,100);
then you need to draw a line to the 2nd corner using lineTo
e.g. line.lineTo(100,200);
http://www.kirupa.com/developer/actionscript/as_tricks.asp
choose drawing API. Ilyas can explain better than me…:slight_smile: