To move a point to the current mouse position in a frame called MyFrame:
var Pos = GetMousePosition();
MyFrame.MovePoint( 3, Pos.x, Pos.y );
To draw a triangle then move the top point to wherever the mouse is clicked:
// Draw a triangle
DrawFrame.DrawRegPoly( 200, 150, 400, 400, 3 );
// Add a left click handler to the frame
DrawFrame.RegisterEventHandler( "lclick", this.MoveHandler );
// Event callback for the left click event
function MoveHandler( Click )
{
this.MovePoint( 0, Click.x, Click.y );
}