Internet Cross Logo
Internet Cross your one stop web tutorial website
Your Ad Here

Swaping Movie Clips Depths

by Anand

In technical swaping is interchanging the depths of movieclips.

1. Create two movie clips with instance names "mc1" & "mc2".

2. Then create button both the movie clips with instance "button1" & "button2".

3. Keep both the clips on the stage such a way that they one overlaps the other.. so that we can see the swapping of the clips.

4. Then type the below script in a keyframe in a new layer.

mc1.button1.onRelease=function(){     // button click function
mc1.swapDepths(mc2);
                      // swapping clip 1 to clip 2
}
mc2.button2.onRelease=function(){
     // button click function
mc2.swapDepths(mc1);
                      // swapping clip 2 to clip 1
}


[Download File][Page 1]
Visit our forums to discuss / post your problems.