# Coding Issues

**URL:** https://forum.kirupa.com/t/coding-issues/187791
**Category:** flash
**Created:** [May 2, 2006, 11:00am UTC](https://forum.kirupa.com/t/coding-issues/187791 "2006-05-02T11:00:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![csr500](https://avatars.discourse-cdn.com/v4/letter/c/278dde/32.png) [@csr500](https://forum.kirupa.com/u/csr500)
#### Post date: [May 2, 2006, 11:00am UTC](https://forum.kirupa.com/t/coding-issues/187791/1 "2006-05-02T11:00:01Z")

</div>

Morning All

I am having some coding issues and I have been trying to sort it out all weekend, however it now appears as though I am going to have to admit defeat and ask for help.

I am trying to do a drag and drop with four movies, when the movie is dragged over the hit area the movie plays.

I have placed the following code to each of the movies.

[COLOR=red]onClipEvent (load) {  
startX = this.\_x;  
startY = this.\_y;  
}[/COLOR]  
[COLOR=red]onClipEvent (enterFrame) {  
if (\_root.draggeddraggable3) {  
\_root.draggable3.\_x = \_root.\_xmouse;  
\_root.draggable3.\_y = \_root.\_ymouse;  
}  
}  
onClipEvent (mouseUp) {  
if (this.hitTest(\_root.hit)) {  
\_root.draggeddraggable3 = false;  
\_root.gotoAndPlay (**[COLOR=darkorchid]1130[/COLOR]**);  
\_root.draggable3.\_x = startX;  
\_root.draggable3.\_y = startY;  
} else {  
\_root.draggable3.\_x = startX;  
\_root.draggable3.\_y = startY;  
\_root.draggeddraggable3 = false;  
}  
}[/COLOR]

[COLOR=black]The highlighted number obviously changes for each movie.[/COLOR]  
My issue is that it only appears to play the final movie of the four when I drag any of the four movies over the hit area.

The code has been taken from the following tutorial

[http://www.tutorialized.com/tutorial/Drag-Drop-and-Swap/2835](http://www.tutorialized.com/tutorial/Drag-Drop-and-Swap/2835) and adapted to suit my needs

Any help on this issue would be very much appreciated
