Juan Francisco
Juan Francisco

Reputation: 11

Is there a way to use attachMovie in different layers?

I'm currently writing a code that when executed, it'll attach lots of movieClips into the _root property. Is there is a way to choose which layer these movieClips are attached into?

For example:

_visible = false;
var entitySpawn;
var ID = 10;
function spawnEntity(TYPE, X, Y) {
    entitySpawn = _root.attachMovie(TYPE, TYPE+"_"+ID, ID);
    entitySpawn._x = X;
    entitySpawn._y = Y;
    ID++;
}

I know that the variable ID gives it the depth, but is there a way to chose between the layers itself, so that certain movieClips are above other, no matter their depth?

Upvotes: 0

Views: 23

Answers (0)

Related Questions