|
-
startDrag() - Object back to original position?
Hey everyone,
Well I have a seemingly simple question here. I have a box , thats right a nice shiney box , and within it contains a smaller blue box which is a movieclip.
Now, when you click this small worthless little box, startDrag(); begins and it follows you around : onClipEvent (mouseDown){
When you release this box, it goes back to its start position , into the centre of the bigger box : onClipEvent(mouseUp){
Thats whats supposed to happen. You click and it follows until you release the mouse and it'll go back to its original position.
Now the problem is this:
After releasing the small box, it goes back to its original position, but continues to follow the mouse from there ... but just from the distance. In other words, startDrag(false); hasnt really worked 
Heres the code :
code: onClipEvent (load) {
startX = this._x;
startY = this._y;
}
//
onClipEvent (mouseDown) {
this.startDrag(true);
}
//
onClipEvent (mouseUp) {
this.startDrag(false);
this._x = this.startX;
this._y = this.startY;
}
If anyone could help me out here?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|