# Trig / Lines / Coordinates \[CS4/AS3\]

**URL:** https://forum.kirupa.com/t/trig-lines-coordinates-cs4-as3/288905
**Category:** flash
**Created:** [May 22, 2009, 6:20pm UTC](https://forum.kirupa.com/t/trig-lines-coordinates-cs4-as3/288905 "2009-05-22T18:20:50Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![bmo](https://avatars.discourse-cdn.com/v4/letter/b/9de0a6/32.png) [@bmo](https://forum.kirupa.com/u/bmo)
#### Post date: [May 22, 2009, 6:20pm UTC](https://forum.kirupa.com/t/trig-lines-coordinates-cs4-as3/288905/1 "2009-05-22T18:20:50Z")

</div>

Hey all,

Have a math/trig problem I’ve been working on for a little while and can’t seem to solve, was hoping somebody here might be able to.

I am working on an application which uses stage align top and no scale. Therefore the x axis coordinate system changes if the window is resized… 0 ends up not being the left edge. That is not a problem insofar as I can still locate the left edge with an equation.

My problem comes in the form of trying to draw a line, which may be easier to think of as the hypotenuse of a triangle. It needs to be drawn dynamically, because I will have no way of knowing what dimensions the user has their flash application at. Perhaps some examples will help.

Fig1  
 ![](http://img40.imageshack.us/img40/9840/fig1.png)

Fig2  
 ![](http://img40.imageshack.us/img40/4731/fig2.png)

Fig1 I can draw no problem. What I want to know is how to (on stage resize) determine new end points for line C (as in Fig2) – **that maintains the same slope and position of the original line, simply extends the end points to the edge of the flash application.**

Any help would be appreciated!
