No there is not, I’m afraid, and also the .x and .y parameters attached to the display object created by the newLine call is actually the centre position of the ‘line’. Try changing the display object’s .x and .y to 0,0. You’ll see it is off screen partially.
The reason is that the display object created by the newLine function does not behave as a vector object but as a regular display object, just like newImage or newRect do.
To change the position of the ends of the line you need to create a new line. To store the Ax,Ay,Bx and By values you need to literally store them on the object. Which, of course, is quite easy.
I recommend making a function which does that all for you - but of, that is basic code reuse.
I am working on a function which would allow the line object to behave the way you are wanting it to, because you’re not alone, but there are inherrant problems because of the many different ways lines (and their many possible vectors) can work. [import]uid: 8271 topic_id: 26202 reply_id: 106261[/import]