Placement of movie clips using attachMovie()

Still plugging away, but I’ve run up against a problem that seems like it should be easy to fix, if I only knew how.\r\rMade a hairline for use in drawing lines with attachMovie(). Wanted to test it by making a “crosshair” at (100,100). You’d think:\r\rattachMovie(“line”,“line1”,1)\r this[“line1”]._x=100;\r this[“line1”]._y=100;\r this[“line1”]._xscale=100;\r this[“line1”]._yscale=0;\r\rattachMovie(“line”,“line2”,2)\r this[“line2”]._x=100;\r this[“line2”]._y=100;\r this[“line2”]._xscale=0;\r this[“line2”]._yscale=100;\r\ryoud’ think that would draw a cross-hair, right? Ok, even if you move the placement by (length/2) to account for the center of the line, it’s still off.\r\rSo, I guess my question is – how do you do a “crosshair” at position (100,100) using an attachMovie()?\r\rTHANKS!!\r\rShannon\r

Hey Shannon,\rHow is it going ?\rAbout your problem : the reason it’s not working is that the clip center is located at the left end of the line, right ? Try to set the center in the middle of the line, with the align tool, and your code works perfectly.\r\rpom 0]

Otherwise this works :

 attachMovie("line", "line1", 1);\r\rthis["line1"]._x = 100;\r\rthis["line1"]._y = 100;\r\rthis["line1"]._xscale = 100;\r\rthis["line1"]._yscale = 0;\r\rattachMovie("line", "line2", 2);\r\rthis["line2"]._x = 100+_root.line2._width/2;\r\rthis["line2"]._y = 100-_root.line2._height/2;\r\rthis["line2"]._xscale = 0;\r\rthis["line2"]._yscale = 100;

pom 0]

why not just do this:\rattachMovie(“line”,“line1”,1);\rattachMovie(“line”,“line2”,2);\rthis.line1._x=100;\rthis.line1._y=100;\rthis.line2._x=100;\rthis.line2._y=100;\rthis.line2._rotation=90;\r\rmake the line centered in the movie clip and either vertical or horizontal.\r:) \rjeremy

Hey, Illyas! Hope all is well! I am on to something with this (thanks SO much for that example you sent over – I am trying to reverse-engineer it to me use).\r\rI still can’t figure this F^*(%$ thing out! I have tried moving the center of the line from left to right to center! It works fine on the vertical lines, but horizontals are off by a lot. \r\rI’ve posted a copy of my basic FLA file for you to look at. It’s at www.interintuit.com/help.fla\r\ranything anyone can help with would be GREATLY appreciated!\r\rThanks!\r\rShannon

Thanks, Sin, but the “crosshair” is just a test for alignment. When that is done, I will need to draw several lines starting in various points at various angles. I just made the problem as simple as possible to not waste anyone’s time in the forum.\r\rShannon

you could steal the code from this:\rjeremydecker.s5.com/curved_line.fla\r:) \rjeremy