peasepud
Programmer
- Jul 20, 2007
- 35
Hi,
Im totally new to Flash and am trying to get the most simple of drag and drop to work. I have two movie clips on the left hand side in one frame and you can drag each of them over onto the right hand side. The items drag as expected when you click and drag but when you release the button it doesnt release, the item still moves even without the mouse button down. There is no correct place to drop the item so I havent bothered creating a test to see where they are being released, the actionscript I have is:
item1_mc.onPress = function():Void {
this.startDrag(true);
};
item1_mc.onRelease = function():Void {
this.stopDrag();
};
item2_mc.onPress = function():Void {
this.startDrag(true);
};
item2_mc.onRelease = function():Void {
this.stopDrag();
};
Any thoughts? Do I need to create a "dropzone" or am I missing something really silly?
Im totally new to Flash and am trying to get the most simple of drag and drop to work. I have two movie clips on the left hand side in one frame and you can drag each of them over onto the right hand side. The items drag as expected when you click and drag but when you release the button it doesnt release, the item still moves even without the mouse button down. There is no correct place to drop the item so I havent bothered creating a test to see where they are being released, the actionscript I have is:
item1_mc.onPress = function():Void {
this.startDrag(true);
};
item1_mc.onRelease = function():Void {
this.stopDrag();
};
item2_mc.onPress = function():Void {
this.startDrag(true);
};
item2_mc.onRelease = function():Void {
this.stopDrag();
};
Any thoughts? Do I need to create a "dropzone" or am I missing something really silly?