Drag function AS2

View previous topic View next topic Go down

Drag function AS2

Post  avatarbobo on Sun Jan 17, 2010 1:14 pm

hey there! i want to show you how to make a drag function in Actioscript 2, here is the code:

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 : 26
Location : Guatemala

View user profile

Back to top Go down

Re: Drag function AS2

Post  Exzeta on Sun Jan 17, 2010 9:49 pm

AS2,3?

Exzeta
Admin

Posts : 34
Join date : 2010-01-08
Location : Guatemala

View user profile http://minigrounds.forumotion.net

Back to top Go down

Re: Drag function AS2

Post  blargitown on Thu Jun 24, 2010 1:00 pm

yes

blargitown

Posts : 51
Join date : 2010-01-08
Age : 19
Location : United States

View user profile http://WebStarts.com/CalebRandomness

Back to top Go down

Re: Drag function AS2

Post  Sponsored content Today at 11:14 am


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum