# Enlarging pictures & hiding other layers

**URL:** https://forum.kirupa.com/t/enlarging-pictures-hiding-other-layers/35317
**Category:** Uncategorized
**Created:** [November 12, 2003, 5:40pm UTC](https://forum.kirupa.com/t/enlarging-pictures-hiding-other-layers/35317 "2003-11-12T17:40:49Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Janet\_Denton](https://avatars.discourse-cdn.com/v4/letter/j/ccd318/32.png) [@Janet\_Denton](https://forum.kirupa.com/u/Janet_Denton)
#### Post date: [November 12, 2003, 5:40pm UTC](https://forum.kirupa.com/t/enlarging-pictures-hiding-other-layers/35317/1 "2003-11-12T17:40:49Z")

</div>

Any advice?  
I have 5 simple buttons, the down state of the button is the picture enlargement full screen so when user clicks & holds they can look at the picture.  
BUT–one tinsey problem, is there a way to hide the other button layers that are there because the other buttons end up showing on top of the picture that is clicked on if in a higher layer…  
EX: User clicks on layer 2 button to enlarge pic, layer 3 4 & 5 button show up on top of the pic.

If it is not too difficult please advice.  
I am not very actionscript oriented…  
If pretty difficult to understand—please let me know as I can always scrap plan A & go to plan B…(start over)

Thanks for your time  
Janet

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 12, 2003, 7:45pm UTC](https://forum.kirupa.com/t/enlarging-pictures-hiding-other-layers/35317/2 "2003-11-12T19:45:04Z")

</div>

You can use something called “swapDepth” for this. On your button apply a this script to it.

```auto
on (rollOver) {
	this.swapDepths(999);
}

```

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 13, 2003, 1:32am UTC](https://forum.kirupa.com/t/enlarging-pictures-hiding-other-layers/35317/3 "2003-11-13T01:32:03Z")

</div>

Hmmm…sounds easy enough, But I must be doing something wrong, because it is not bring the picture up on top on the other buttons.

I am attaching this script to each button right?

I click on the button & the open up the action panel & paste in in correct?

Please advise.

Thanks  
Janet

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 13, 2003, 8:36am UTC](https://forum.kirupa.com/t/enlarging-pictures-hiding-other-layers/35317/4 "2003-11-13T08:36:53Z")

</div>

Got it! Almost…I think at least got a close to what I want!

I read the tutorial on SwapDepth on this website…Now all I have to figure out is how to get my interface on top & I’ll be set!

Thank You.  
Janet

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 13, 2003, 8:54am UTC](https://forum.kirupa.com/t/enlarging-pictures-hiding-other-layers/35317/5 "2003-11-13T08:54:58Z")

</div>

You’re welcome, I’m glad you searched around and read the tutorial for swapDepths. =)
