# Flash 8, ActionScript 2.0 - swapDepths(for a simple line)

**URL:** <https://forum.kirupa.com/t/flash-8-actionscript-2-0-swapdepths-for-a-simple-line/176794>\
**Category:** flash\
**Created:** [January 26, 2006, 11:11pm UTC](https://forum.kirupa.com/t/flash-8-actionscript-2-0-swapdepths-for-a-simple-line/176794 "2006-01-26T23:11:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikeymac](https://avatars.discourse-cdn.com/v4/letter/m/46a35a/32.png) [@mikeymac](https://forum.kirupa.com/u/mikeymac)\
**Post date:** [January 26, 2006, 11:11pm UTC](https://forum.kirupa.com/t/flash-8-actionscript-2-0-swapdepths-for-a-simple-line/176794/1 "2006-01-26T23:11:33Z")

</div>

Newbie question here!

I have created a Flash movie with the following attributes:

1 dynamic TextField object.

1 dashed line created with the Line Tool

Both objects were created in Layer 1.

The movie is loaded in a web browser. At runtime, I load a background image in the movie based on a querystring parameter.

At first, the background image would always load on top of the TextField and dashed line. I wanted the background image to be in the…ahem…background, so I did some research and discovered the swapDepths method. I was able to use this method with the TextField object by using a well-known hack mentioned frequently in these forums(TextField.prototype.swapDepths = MovieClip.prototype.swapDepths).

This worked smashingly for the TextField. The background loads BEHIND the TextField. Great.

Unfortunately, I can’t figure out how to do something similar for the dashed line that I created with the Line tool.

What’s the secret? How do you “get at” the line? Any help would be appreciated!

Thanks!

- Mikeymac =)
