PDA

View Full Version : swapping depths with objects on stage


Clayton Bellmor
07-13-2006, 09:58 AM
Here's what I have so far:
http://www.clay.bellmor.com/PFC/

The two bulletins "news" and "promotions"... notice how the promo is above the news and they're both under the plant (which is good on stage but not when they're clicked)... how can i fix that? Also, resetting it when you close the window so that they're both back under the plant.

I've been reading about swapDepth and looking at some tutorials but they're really not helping me.

Thanks for any help!

mooska
07-13-2006, 10:21 AM
Its swapDepths, i really think this was your problem

Clayton Bellmor
07-13-2006, 10:28 AM
stop();
onPress = function(){
gotoAndPlay("zooms");
promo.swapDepths(news);
plantsone.swapDepths(news);
}

I turned the plants into a mc (plantsone) and the promo and news bulletins are the same mc with dynamic text.

This is the code for the news/promo mc.

I also tried:
stop();
onPress = function(){
gotoAndPlay("zooms");
news.swapDepths(promo);
news.swapDepths(plantsone);
}

I have the gut feeling that I'm not writing it correctly at all.