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

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

when you define its depth, make it negative…

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

that should work…

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

Thanks for trying though… any other ideas?

try using swapdepths to change the depth of your crosshairs

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

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

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

pom :cowboy:

There is one :grrrr:

Ahhhh… I’m sorry :!: