# Issues w/drag and drop

**URL:** <https://forum.kirupa.com/t/issues-w-drag-and-drop/118255>\
**Category:** Uncategorized\
**Created:** [August 4, 2004, 1:44am UTC](https://forum.kirupa.com/t/issues-w-drag-and-drop/118255 "2004-08-04T01:44:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fiCti0naL](https://avatars.discourse-cdn.com/v4/letter/f/8491ac/32.png) [@fiCti0naL](https://forum.kirupa.com/u/fiCti0naL)\
**Post date:** [August 4, 2004, 1:44am UTC](https://forum.kirupa.com/t/issues-w-drag-and-drop/118255/1 "2004-08-04T01:44:56Z")

</div>

Heya, im currently working on a project that requires a “experimental navigation” that leads to page with dynamically loaded content from a database.

Basically, my idea is to make a RTS-like game, where in order to reach the sections of the site, you have to build certain buildings in a tech-tree like fashion. As you build, more sections become available. Now, im not the best at actionscripting, but I do have some experience with it.

My problem is, im trying to create a drag and drop, so when you click on the button to create a building and drag it to the build area, the construction of the building animates and finishes. I would like the building to be clickable also so when all the buildings are constructed you can click on them to go back to certain areas.

this is what i have on the button:  
on (press) {  
startDrag ("\_root.drag\_main"); //\<-- (drag\_main is a duplicate image of the button in movie clip form on the main stage so it can be dragged)  
\_root.main = 1; //\<-- (this is just making the movie clip appear, as i have the alpha set to 0 and 1 is the variable calling it to be visible)  
}  
on (release) {  
stopDrag();  
\_root.drag\_main.gotoAndPlay(“main”); //\<-- (this is pointing to the animation of the building constructing and finishing which is inside of the duplicate button movie clip)  
}

if this is confusing, i understand and if there is any ideas of just starting over and doing it a different way i’m all for it. I’m sure there is a much simpler way of doing this.  
What happens with this code is, if i drag and drop the animation wont play, but if i just click and release the button the animation works. It just doesnt work if i drag first. Any ideas or suggestions anyone has i’d appreciate. thanks
