This content has been marked as final. Show 3 replies
you simply need to create an event that during the drag continually repositions the 'tip' in relation to the 'pen'. In your onPress handler being the event and stop it in the onRelease, something like:
that is kind of what i was thinking but this is the part i left out and it gets a little tricky. this is for a volt meter and at the other end of the "pen" i have a cord being drawn and updating as the pen is dragged. The problem lies with the orientation point having to be at the bottom of the pen and the tip.
hey no problem, all you need to do is decide where you want the 'tip' to be in relation to the 'pen' and adjust the coordinates. lets say your pen slants from the bottom of the bounding box left to right like this slash ( / ) so i this case the _x position will remain at 0 and the _y position will be the _height of the box so you would adjust the coordinate in the lines above for the _y position like so:
tip._y = pen._x+pen._height;
or any other number depending on where you want the tip to orient to. same is true of the _x position, add a number to it if the point you want is greater or even less than the _x position of the pen :)