Check All Points Along a Line?

I’m using Flash 8 and AS2

I am attempting to make some code that checks whether or not a line that rotates around the screen is hitting a movie clip. Here is my code (with comments explaining it):

    //center points
    xc =;
    yc =;
    //the angle at where the point on circumfrence is
    a =;
    //length of the line / radius of circle
    r = 181;
    //formula to find the point on circumfrence
    xp = xc + r * Math.cos(a);
    yp = yc + r * Math.sin(a);
    //point to check along the line between the two points
    xnp = xp;
    ynp = yp;
    //if the line is visible (2 is the only frame it is visible on)
    if( == 2){
        //while the point to be checked still isn't the same as the center point
        while(xnp != xc){
            while(ynp != yc){
                //this code makes sure that the while() loop doesn't go on forever by setting a stop point for the minusing of the radius, then printing "No"
                if(r < 0){
                    xnp = xc;
                    ynp = yc;
                //if the object hits the certian point we are checking on the line, then it ends the while loop and prints "Yes"
                }if(this.hitTest(xnp, ynp, true)){
                    xnp = xc;
                    ynp = yc;
                //otherwise, the length of the line is subtraced by 1, so that we can check the next point along the beginning line

Needless to say, it doesn’t work. Basically, I keep getting the print “No” and I don’t know what’s wrong with my code!
Thanks for the help!