# Swap depth of JPGs, is it possible?

**URL:** <https://forum.kirupa.com/t/swap-depth-of-jpgs-is-it-possible/118800>\
**Category:** Uncategorized\
**Created:** [August 9, 2004, 9:20am UTC](https://forum.kirupa.com/t/swap-depth-of-jpgs-is-it-possible/118800 "2004-08-09T09:20:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Algreco](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@Algreco](https://forum.kirupa.com/u/Algreco)\
**Post date:** [August 9, 2004, 9:20am UTC](https://forum.kirupa.com/t/swap-depth-of-jpgs-is-it-possible/118800/1 "2004-08-09T09:20:12Z")

</div>

We can swap depths of movie clips… ok…what about JPGs?  
I have an empty MC where I want to load images from an array and then starts swapping thier depths.  
Here is the script I use for loading them and the script I wans hoping will work for swapping thier depths:  
onClipEvent (load){  
var image\_arr = new Array “1.jpg”,“2.jpg”,“3.jpg”…,“7.jpg”);  
for (var i=0;i\<image\_arr.length;i++)  
{  
loadMovieNum(image\_arr\*, i);  
trace ("loaded image " + image\_arr\* + " in level " + i) }  
}  
onClipEvent (enterFrame){  
trace (this + image\_arr[5]);  
this.image\_arr[5].swapDepths (6);  
}

How would I swap the depth of image 6 (image\_arr[5].) and have it come to the surface?

---

<div class="post-metadata">

**Author:** ![senocular](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/senocular/32/7217_2.png) [@senocular](https://forum.kirupa.com/u/senocular)\
**Post date:** [August 9, 2004, 12:42pm UTC](https://forum.kirupa.com/t/swap-depth-of-jpgs-is-it-possible/118800/2 "2004-08-09T12:42:25Z")

</div>

if the jpg is in a movieclip, use swapdepths on the movieclip. if its not, put it in one.

---

<div class="post-metadata">

**Author:** ![Algreco](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@Algreco](https://forum.kirupa.com/u/Algreco)\
**Post date:** [August 9, 2004, 2:15pm UTC](https://forum.kirupa.com/t/swap-depth-of-jpgs-is-it-possible/118800/3 "2004-08-09T14:15:39Z")

</div>

Hey!, thanks for answering.  
I actually learned that once you load more than 1 jpg into a movie clip, you can’t start effecting the images there.  
So I actually did as you suggested. I loaded images to seperate movie clips
