all groups > flash actionscript > march 2004 >
You're in the

flash actionscript

group:

help wih startDrag/stopDrag


help wih startDrag/stopDrag cdanvers
3/10/2004 10:59:27 PM
flash actionscript:
Hi.

I have 6 pieces which can be dragged anywhere on the screen. I have used
startDrag and stopDrag, but stop drag wont 'drop' the piece when the mouse
button is released and it follows the mouse cursor around until you click on a
new piece.

This is what I am using:

on(press) {
startDrag(this,true);
}
on(release) {
stopDrag();
}

Any suggestions?
Re: help wih startDrag/stopDrag Laiverd.COM
3/11/2004 12:05:24 AM
buttonInstancename.onPress = function() {
startDrag(this,true);
};
buttonInstancename.onRelease = function() {
stopDrag();
};

John

--
----------------------------------------------------------------------------
-----------
RESOURCES
http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash
----------------------------------------------------------------------------
-----------
TUTORIALS at
www.laiverd.com
Flash & PHP Emailform
Using textfiles in Flash
----------------------------------------------------------------------------
-----------

Re: help wih startDrag/stopDrag genotype
4/19/2004 4:34:28 PM
Re: help wih startDrag/stopDrag JayBrady
4/19/2004 4:55:03 PM
if you don't need to lock to anchor, this will work:

on(press) {
startDrag(this);
}
on(release){
stopDrag();
}
AddThis Social Bookmark Button