Devam Ediyor

drag drop action script help

Hi all

This might be pretty simple....but aparently not for me.

I'm using the below script (off a great tutorial from [url removed, login to view]) You can see and download fla files here what show what it does.

But i really need it to be able to have multiple targets also.

The essential is that it has to animate to the targets and/or to its start position, in a smooth motion, but I will gladly use any script that does that, where you can easyli change multiple dragable clips and multiple targets. The script should also be able to set different variables when each clip is droppped on each target.

Here's the script.

function dragSetup(clip, targ) {

[url removed, login to view] = function() {

startDrag(this);

this.beingDragged=true;

};

[url removed, login to view] = clip.onReleaseOutside=function () {

stopDrag();

this.beingDragged=false;

if (eval(this._droptarget) == targ) {

[url removed, login to view] = true;

[url removed, login to view](2);

} else {

[url removed, login to view] = false;

[url removed, login to view](1);

}

};

//the variables below will store the clips starting position

[url removed, login to view] = clip._x;

[url removed, login to view] = clip._y;

//the variables below will store the clips end position

[url removed, login to view] = targ._x;

[url removed, login to view] = targ._y;

[url removed, login to view] = function() {

//all these actions basically just say "if the mouse is up (in other words - the clip is not being dragged)

// then move the MC back to its original starting point (with a smooth motion)"

if (![url removed, login to view] && ![url removed, login to view]) {

this._x -= ([url removed, login to view])/5;

this._y -= ([url removed, login to view])/5;

//if the circle is dropped on any part of the target it slides to the center of the target

} else if (![url removed, login to view] && [url removed, login to view]) {

this._x -= ([url removed, login to view])/5;

this._y -= ([url removed, login to view])/5;

}

};

}

dragSetup(circle_mc,targetCircle);

dragSetup(circle2_mc,targetCircle2);

thank you

Karsten Flindt

Beceriler: Adobe Flash

Daha fazlasını görün: smooth drag actionscript, smooth dragging actionscript, drag smooth motion as2, smooth drag drop actionscript, actionscript drag drop, tutorial words, tutorials point, set tutorials, mc edu, index tutorial, help php, great clips, drop to design, animate this, actionscript smooth drag, flash actionscript drop multi targets, flash smooth drag, as3 smooth drag, simple actionscript drop drag actions, as3 drag smooth, drag smooth flash, drag drop multiple targets, smooth drag drop flash, drop drop multi target actionscript, menu drag actionscript

İşveren Hakkında:
( 7 değerlendirme ) copenhagen, Denmark

Proje NO: #125289