The line tool works fabulously as I mentioned, but I was wondering how I would go about making it so that the lines created can be individually manipulated again after they are drawn, ie clicked and dragged to another position??
Ive thought about this long and hard, and all I can think of is making it so that each line that is drawn is created inside an emptyclip or attached to an empty clip which itself has a drag method. But Ive got no real idea how to do this properly with your code. Could provide me with any help?
Thats ok, thanks anyway lost. ā¦ I can get it drawing in individual clips but for some reason it draws offset to the hitTest area (canvas mc), ie I tempLine gets drawn on canvas and the final line appears about 100px to the left lol.
Heya lost sorry, I found this script in actionscript.org, pretty good and close to the functionality Im trying to achieve. Would this spark you inner mind?
I think the problem is the targetting of the line.
Sometimes _root, this, or _parent doesnāt alway work. In that case sometimes you have to resort to this._parent. And depending on how many clips your final clip is in it can be this._parent._parent._parent, etc, etcā¦lol.
The offsetting seems to me like you are setting _x and _y coordinate (or possible _xmouse and_ymouse coordinates) by the wrong timelines settingsā¦ if you know what I mean.
I created a movie clip and moved it center stage (that isā¦ if your movie is the standard 550x400), then I use an onMouseMove to trace the _xmouse position on the _root timeline and the _xmouse position inside the test clips timeline. You will see they return different results. As you get closer to the upper left, the _root._xmouse returns closer to 0, and as you get closer to the center of the stage the test._xmouse returns closer to 0.
Hmm yeah I know what you mean regarding the timelines. And the targeting is deffintly the problem because the final line appears to be exactly the same size, angle etc its just that its offset as I mentioned, to the left. :hair:
Seems to be it gets the xPos and yPos ok, but when it redraws the line as final line it appears to draw under the coordinates of the āouterā clip and I have no idea which clip is this āouterā clip BAH
*Originally posted by mindfriction *
**Hmm yeah I know what you mean regarding the timelines. And the targeting is deffintly the problem because the final line appears to be exactly the same size, angle etc its just that its offset as I mentioned, to the left.
Seems to be it gets the xPos and yPos ok, but when it redraws the line as final line it appears to draw under the coordinates of the āouterā clip and I have no idea which clip is this āouterā clip BAH **
Yeah, the xPos and yPos are probably correct, your just targeting the wrong timeline to draw the final line in, so its creating it in the right coords of the wrong clip, causing the offset.
At least in theory I think thats the problem. Good luck finding out how to target itā¦ that kind of stuff is a PAIN!!!
Hey one other thing before I dive into this painful mess just a passing thought, if I clear temp line mc as I do, how can I be sure the final line empty clip i create will register at the same relative position as the temp line empty?
If you want to be sureā¦ then donāt clear your temp lineā¦ if thats what you mean. You can always comment out the tempLine clear code while testing then uncomment it when your done.
That is if I understand what you are saying. Its 3am now and I gotta get up earlyā¦ so I really have to go now and I hope I understood correctly.
Thanks for listening (or reading) my insanity lost.
Usually im on the forums late because it seems thats the best time to be on due to timeline difference, its actually 5.00pm in Melbourne Australia atm.
Iāll let you know how it goes