Anon
Register to earn points!
Login  Register
Homepage | News | Subscribe | Member list | Links | Submit File

Profile
Avatar
smily
90 Points

Views: 16   File ratings: 0   File comments: 4   
smily's submited files
smily's favourite files
No favourite files yet
smily's latest comments
AS3:

var ll:Sprite=new Sprite();
ll.graphics.lineStyle(2, 0x0, 100);
ll.graphics.moveTo(p1.x,p1.y);
ll.graphics.lineTo(p2.x,p2.y);
ll.graphics.moveTo(p2.x,p2.y);
ll.graphics.lineTo(p1.x,p2.y);
ll.graphics.moveTo(p1.x,p2.y);
ll.graphics.lineTo(p1.x,p1.y);

addChild(ll);
p1.addEventListener(MouseEvent.MOUSE_DOWN,sta_Move);
p1.addEventListener(MouseEvent.MOUSE_UP,sta_stop);
function sta_Move(e:MouseEvent):void
{
p1.addEventListener(MouseEvent.MOUSE_MOVE,sta_line);
p1.startDrag();
}

function sta_stop(e:MouseEvent):void
{
p1.stopDrag();

}
function sta_line(e:MouseEvent):void
{
ll.graphics.clear();
ll.graphics.lineStyle(2, 0x0, 100);
ll.graphics.moveTo(p1.x,p1.y);
ll.graphics.lineTo(p2.x,p2.y);
ll.graphics.moveTo(p2.x,p2.y);
ll.graphics.lineTo(p1.x,p2.y);
ll.graphics.moveTo(p1.x,p2.y);
ll.graphics.lineTo(p1.x,p1.y);


}
User info