# Drag and drop z order

**URL:** <https://forum.kirupa.com/t/drag-and-drop-z-order/101147>\
**Category:** Uncategorized\
**Created:** [February 6, 2004, 1:32pm UTC](https://forum.kirupa.com/t/drag-and-drop-z-order/101147 "2004-02-06T13:32:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![souljunta](https://avatars.discourse-cdn.com/v4/letter/s/ebca7d/32.png) [@souljunta](https://forum.kirupa.com/u/souljunta)\
**Post date:** [February 6, 2004, 1:32pm UTC](https://forum.kirupa.com/t/drag-and-drop-z-order/101147/1 "2004-02-06T13:32:38Z")

</div>

Hi there

I’m new to the forum so firstly helllo

I’m trying to create a reasonable simple drag and drop animation when the user can grab different coloured square around the stage.

The problem is I want to have the animation so when they click on eack individual square it pops to the top of the z order (the forground) and then on release returns to it’s original postion in the animations z-order (layers)

Any ideas on how to code this ?
