Groups | Blog | Home
all groups > flash (macromedia) > february 2004 >

flash (macromedia) : problem with swapDepth


chicken king
2/6/2004 8:35:22 PM
hello ou there...

i am working on a quick game and am having a problem with swapDepth [which i am using for the first time]

i am using the following code to have two objects swapDepth based on their relative _y positions:

onClipEvent (enterFrame) {
if (_root.toaster._y>=_root.app._y-10) {
_root.toaster.swapDepths(3);
_root.app.swapDepths(2);
}
}

onClipEvent (enterFrame) {
if (_root.toaster._y<_root.app._y-10) {
_root.toaster.swapDepths(2);
_root.app.swapDepths(3);
}
}

this code is working fine. the problem is that when you succeed or fail at this part of the game i want to go on to the next scene. i am going to the next scene just fine, but the toaster mc and app mc still show up in the next scene even though they are not actually in that scene of my .fla.

if someone could tell me what i am missing i would greatly appreciate it. neither flash built in help nor the flash bible are being useful on this one.

thanks in advance for help on this one.

Mark Rosmann
2/9/2004 7:58:59 PM
I too am experiencing the very same problem and would be grateful for any
advice.

Thanks & tc,
Mark


"chicken king" <webforumsuser@macromedia.com> schrieb im Newsbeitrag
news:c00tqa$e50$1@forums.macromedia.com...
[quoted text, click to view]
this part of the game i want to go on to the next scene. i am going to the
next scene just fine, but the toaster mc and app mc still show up in the
next scene even though they are not actually in that scene of my .fla.
[quoted text, click to view]
neither flash built in help nor the flash bible are being useful on this
one.
[quoted text, click to view]

AddThis Social Bookmark Button