Drag and drop

Hello!

I need help with drag and drop functions. I have done a animation like a windows window that i want to do so i can drag and drop it. I think the window should have a code like this:

[color=blue]on (press) {[/color]
[color=blue]tellTarget(“Fonster”){[/color]
[color=blue]gotoAndPlay(“1drag”)[/color]
[color=blue]}[/color]
[color=blue]startDrag ("_root.Fonster");[/color]
[color=blue]}[/color]

[color=blue]on (release) {[/color]
[color=blue]tellTarget(“Fonster”){[/color]
[color=blue]gotoAndPlay(“1drop”)[/color]
[color=blue]}[/color]
[color=blue]stopDrag ("_root.Fonster");[/color]
[color=blue]}[/color]

[left][color=red]::The tellTarget i have in the code is an effect::[/color][/left]
But it aint working. Someone know what the problem is?

on (press) {
_root.Fonster.gotoAndPlay(“1drag”);
_root.Fonster.startDrag ();
}

on (release) {
_root.Fonster.gotoAndPlay(“1drop”);
stopDrag ();
}

that should work… tellTarget has been depricated since flash 5 try to avoid using it when you can.
Good Luck

thx :smiley: its working!