View Single Post

  #2 (permalink)  
Old 20-08-08, 15:16
Onsitus's Avatar
Onsitus Onsitus is offline
CSS.FlepStudio.org
 
Join Date: Jul 2007
Location: Nettuno Beach
Posts: 1,066
Rep Power: 3
Onsitus is on a distinguished road
Re: declaring variables

Quote:
Originally Posted by Aaron24 View Post
hi just wondering if someone can tell me how I can declare a start variable on a draggable movieclip so that it snaps back to its starting position in once the stopDrag has been called
Hi, declare your var to start with, recall them when the drag stops
Esempio to start:

var xStart:Number = clip._x; //could also be a number
var yStart:Number = clip._y;

when the drag stops:

clip._x=xStart;
clip._y=yStart;

Then to apply to your code.
Reply With Quote