Thanks - but it doesn't work for me - I can startDrag, but it doesn't stopDrag on release.
Just to be shure I'm getting this right.
I paste your actionscript into the first frame of the movie.
I create a movieclip with instance name "pallet1_mc"
emptyspaces is just a variable declaring the position of empty spaces.
Main Topics
Browse All Topics





by: BillystyxPosted on 2005-05-10 at 06:51:18ID: 13968321
emptyspaces=[50,50],[50,10 0],[50,150 ]]; ;
{ aces[i][0] ,emptyspac es[i][1])) {
pallet1_mc.onPress = function() {
pallet1_mc.startDrag(true)
this.oldX=pallet1._x;
this.oldY=pallet1._y;
};
pallet1_mc.onRelease = function() {
for(i=0;i<emptyspaces;i++)
if(pallet1.hitTest(emptysp
pallet1_mc.stopDrag();
this.hit=true;
emptyspaces.splice(i,1);
}
}
if(this.hit!=true){
pallet1_mc._x=oldX;
pallet1_mc._y=oldY;
}
this.hit=false;
};
as a simple drag and test solution
Billystyx