0

I'm having trouble in as2, I'm using

var ThisMC:MovieClip = this.AttachMovieClip("Duck"+rnd_Duck + "_mc", "target" +        _global.cDepth, _global.CDepth)

This Action is on the Actions layer, first frame bottom of timeline, yet the ducks still appear on the top, how might I fix this?

Coppyhop
  • 23
  • 6

1 Answers1

0

the keyword this means you are attaching it to the stage. make an empty container movieClip, and attachMovie into that:

var ThisMC:MovieClip = myContainerMovieClip.attachMovie("Duck"+rnd_Duck + "_mc", "target" +        _global.cDepth, _global.CDepth)

Now you can place this container movieclip on any layer you wish and your "Duck" will be where you expect.

Ribs
  • 1,449
  • 2
  • 13
  • 27