Drag function AS2
3 posters
Page 1 of 1
Drag function AS2
hey there! i want to show you how to make a drag function in Actioscript 2, here is the code:
that's all. now, to use it, you must create a Movie Clip, and then put on the frame actions:
mymovieclip.onPress = drag;
mymovieclip.onRelease = drop;
You can use it endless times!
- Code:
function drag ():Void {
this.startDrag();
this.onMouseMove = refreshscreen;
}
function drop ():Void{
this.stopDrag();
this.onMouseMove = null;
}
function refreshscreen ():Void{
updateAfterEvent();
}
that's all. now, to use it, you must create a Movie Clip, and then put on the frame actions:
mymovieclip.onPress = drag;
mymovieclip.onRelease = drop;
You can use it endless times!
Last edited by avatarbobo on Mon Jan 18, 2010 9:29 am; edited 2 times in total
avatarbobo- Admin
- Posts : 33
Join date : 2010-01-08
Age : 34
Location : Guatemala
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|