Groups | Blog | Home
all groups > flash actionscript > december 2006 >

flash actionscript : Drag and drop issue


Ole Kristensen
12/17/2006 1:54:55 PM
A drag&drop works fine inside it's own swf.
Now I need to load that drag&drop swf into my main swf.
Everything seems to work fine except for the correct answer? I'm puzzled.

Please advice!

Working code in a self-contained swf:

item_1_mc.onPress = function() {
startDrag(this);
reply.text = "Drag the piece of pipe with the most suitable diameter to avoid
flow noise without being over-sized, and drag it into the installation where
the pipe is missing.";
item_1_mc.swapDepths(2);
}
item_1_mc.onRelease = function() {
stopDrag();
if (this._droptarget == "/target_mc") {
reply.text = "Yes, that?s right!";
item_1_mc._x = 440;
item_1_mc._y = 215;
item_2_mc._alpha = 50;
item_3_mc._alpha = 50;
item_4_mc._alpha = 50;
} else {
reply.text = "No, this is outside the target area!!";
}
}


TIA

Ole
LuigiL
12/17/2006 2:04:35 PM
In the drag&drop swf add as the first line of code on frame 1:
Ole Kristensen
12/17/2006 3:46:47 PM
Thanks for your quick reply, but unfortunalety that wasn't the solution.
Other ideas?
LuigiL
12/17/2006 3:59:50 PM
Well, it should be a path problem. So, what is this line:
if (this._droptarget == "/target_mc") {
AddThis Social Bookmark Button