# Attached clip seems to float far above the rest of the movie

**URL:** <https://forum.kirupa.com/t/attached-clip-seems-to-float-far-above-the-rest-of-the-movie/8414>\
**Category:** flash\
**Created:** [November 20, 2002, 4:17pm UTC](https://forum.kirupa.com/t/attached-clip-seems-to-float-far-above-the-rest-of-the-movie/8414 "2002-11-20T16:17:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![WobblyFork](https://avatars.discourse-cdn.com/v4/letter/w/e68b1a/32.png) [@WobblyFork](https://forum.kirupa.com/u/WobblyFork)\
**Post date:** [November 20, 2002, 4:17pm UTC](https://forum.kirupa.com/t/attached-clip-seems-to-float-far-above-the-rest-of-the-movie/8414/1 "2002-11-20T16:17:57Z")

</div>

Hi all,

I currently am creating a game where you shoot at targets that randomly appear. I have them set to be randomly generated via an attachMovieClip object, and all works well… EXCEPT that whenever it generates the clip from the Library, the instance is WAY above the rest of movie (layer-wise)!

This means that my custom-crosshairs cursor, for instance, is always behind the target and thus the user cannot mouseDown and shoot it.

Ack… any ideas what to do?

Thanks!

- wobbly

---

<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 20, 2002, 4:50pm UTC](https://forum.kirupa.com/t/attached-clip-seems-to-float-far-above-the-rest-of-the-movie/8414/2 "2002-11-20T16:50:59Z")

</div>

when you define its depth, make it negative…

attachMovie(‘whatever’, ‘copy’+ii, ii-2000)

that should work…

---

<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 20, 2002, 11:22pm UTC](https://forum.kirupa.com/t/attached-clip-seems-to-float-far-above-the-rest-of-the-movie/8414/3 "2002-11-20T23:22:19Z")

</div>

Nope, I can’t say that helped anything one bit ☹

Thanks for trying though… any other ideas?

---

<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 20, 2002, 11:41pm UTC](https://forum.kirupa.com/t/attached-clip-seems-to-float-far-above-the-rest-of-the-movie/8414/4 "2002-11-20T23:41:40Z")

</div>

try using swapdepths to change the depth of your crosshairs

---

<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 20, 2002, 11:57pm UTC](https://forum.kirupa.com/t/attached-clip-seems-to-float-far-above-the-rest-of-the-movie/8414/5 "2002-11-20T23:57:45Z")

</div>

Change of direction: swapDepths solves the problem! Thanks Sorcerer 🙂

However, there is another problem… the randomly generated movie clip has no properties associated with it. Now, I have defined these properties already in a test movie clip on the stage. How do I make sure the onMouseDown, etc. properties are transferred to each clip as it is created?

I am not clear on how to use initObject but I think this is where the solution lies. Can anyone give me a quick little tutorial on how initObject is used?

Thanks all!

- your ever-grateful Wobbly

---

<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 21, 2002, 9:22am UTC](https://forum.kirupa.com/t/attached-clip-seems-to-float-far-above-the-rest-of-the-movie/8414/6 "2002-11-21T09:22:41Z")

</div>

There is one :grrrr:  
In the AS tricks section.

pom :cowboy:

---

<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 21, 2002, 4:24pm UTC](https://forum.kirupa.com/t/attached-clip-seems-to-float-far-above-the-rest-of-the-movie/8414/7 "2002-11-21T16:24:15Z")

</div>

> There is one **:grrrr:**

Ahhhh… I’m sorry :!:
