Skip to main content
July 8, 2009
Question

swapdepth question?

  • July 8, 2009
  • 1 reply
  • 743 views

HI! I have three movies in one movie that are in different layers as shown in the pic below. when I run a trace they are all in the same _level10, why is this?

I tried changing the depth to bring one in front of the other and it does do it to a point.

When I start I use this _root.pages2.page6.choosemovie.swapDepths(10); and it will bring the choosemovie in front or the choosecat and the when I click on a movie it then brings the my_FLVPlybk in front and all is well. BUT when I try to bring back the choosecat in front with

_root.pages2.page6.choosecat.swapDepths(10); it does not work. Why?

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
July 8, 2009

each timeline has its own set of depths.

it's not clear what you're tracing but, everything that's on-stage has as its most distant ancestor, _level0.

_root.pages2.page6.choosecat.swapDepths(10);

will move choosecat in front of choosemovie but it's not clear that it will be in front of my_FLVPlybk.  if my_FLVPlybk is in _root.pages2.page6 and its depth is less than 10, then choosecat will move in front of my_FLVPlybk.

July 8, 2009

HI! So how do I make a movie move in the most for front?

Paul

kglad
Community Expert
Community Expert
July 8, 2009

you must find their closest common ancestor.  swap depths of the two common ancestor descendants.