PDA

View Full Version : pb to put an object to front or back


rhapsody
06-25-2001, 03:26 PM
Hi,

I've got a scene where little planets
turn around a sun.

I've made an script that calculate coordonates and it's working fine.

you can look at the swf : http://a.bricout.free.fr/solar_system2.swf

But how can i make the planet go behind the sun ?

Maybe i can switch 2 layers but how ?

Or maybe i can move my object (planet) from one layer
to another behind the sun but how ?

thx

rhapsody
06-25-2001, 03:53 PM
i've found the answer :

_level0.planete1.swapDepths( _level0.sun )


thx for the swap depths tutorial (http://www.actionscripts.org/tutorials/intermediate/swap_depths/index.shtml)

a+

Strok
06-25-2001, 03:56 PM
or you can use just a mask
i made an example for you:

http://www.actionscripts.org/help/_stuff/mask_beh.html
http://www.actionscripts.org/help/_stuff/mask_beh.fla

rhapsody
06-25-2001, 04:16 PM
i'll try the 2 methods.

thanx a lot for your help and your time.


rhapsody
france