Skip to main content
Known Participant
October 3, 2009
Answered

How To Set Depth For Certain Layers

  • October 3, 2009
  • 1 reply
  • 527 views

I'm trying to create a menu for my game, it is a tile-based game, and it draws my tile game ontop of everything. So how can I make my menu layer be above the tile game?

I just want to set its depth so its above the tiles.

This topic has been closed for replies.
Correct answer Ned Murphy

If you look up swapDepths in the AS2 documentation (or even Google it) you will find the details of how it works explained as well as examples of how to use it.  The documentation is one of the best tools you have available to you.

Since I don't know the details of what you are using, it might be something like this, though both pieces have to exist when it executes...

onClipEvent (load){  

  menuName.swapDepths(gameName);

}

1 reply

Ned Murphy
Legend
October 3, 2009

Use swapDepths()

If you receive responses by email, I neglected to notice I was in the AS2 forum and provided an AS3 solution initially.

Known Participant
October 3, 2009

Okay, so if I used swapDepths()

how would that work?

onClipEvent (load){  

  swapDepths();

  }

Like that?

Ned Murphy
Ned MurphyCorrect answer
Legend
October 3, 2009

If you look up swapDepths in the AS2 documentation (or even Google it) you will find the details of how it works explained as well as examples of how to use it.  The documentation is one of the best tools you have available to you.

Since I don't know the details of what you are using, it might be something like this, though both pieces have to exist when it executes...

onClipEvent (load){  

  menuName.swapDepths(gameName);

}