# Actionscript problem stacking order

**URL:** <https://forum.kirupa.com/t/actionscript-problem-stacking-order/199989>\
**Category:** flash\
**Created:** [September 7, 2006, 8:07pm UTC](https://forum.kirupa.com/t/actionscript-problem-stacking-order/199989 "2006-09-07T20:07:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chansnor](https://avatars.discourse-cdn.com/v4/letter/c/d9b06d/32.png) [@chansnor](https://forum.kirupa.com/u/chansnor)\
**Post date:** [September 7, 2006, 8:07pm UTC](https://forum.kirupa.com/t/actionscript-problem-stacking-order/199989/1 "2006-09-07T20:07:39Z")

</div>

Hi there!

I’m quite new in flash, but i would like to have my flash portfolio website up soon… so I decided to build a site with ‘cards’ which can be dragged around. The cards should be stacked just at random order on the site as a user enters. By clicking a card it moves to the front for viewing.  
Based on the tutorial at Kirupa on 'changing stacking order (swapdepth) [http://www.kirupa.com/developer/actionscript/swapdepth.htm](http://www.kirupa.com/developer/actionscript/swapdepth.htm) i started flashing and scripting. I am quite pleased with the results so far, but I have one problem: When clicking a card, it really ‘swaps’ the order with the card that was up front last. Though when clicking a card, the order (and position) of the other cards should actually not change.

The .fla file can be downloaded here: [http://www.basjanson.nl/portfolio.fla](http://www.basjanson.nl/portfolio.fla)

Can anybody help me fixing this?

Thanks a lot in advance!!
