Flash 8 swapDepths on multiple frames

I was looking at swapDepths tutorials when i came across this one.


I downloaded the file and modified it to work with what i need it for. I added a extra frame and made it switch every time you released. But it glitches up and i have no idea why. Could someone please help me.

I attached the modified file.