Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

swapdepths

Status
Not open for further replies.

tweenerz

Programmer
Mar 25, 2002
202
0
0
US
HI,

I have 7 icons on the stage that, when clicked, will enlarge and go to the middle of the stage. What I am doing is swapping the depths to ensure the icon clicked is in the forefront (i.e. not behind other icons). The swapping is occuring correctly, but when I gotoAndPlay, it goes to the specified frame and stops. It won't continue playing. If I take the 'swapDepth' code out, it will play but other icons will be in front of it. Any ideas why swapDepth() causes flash to not play the movie and just simply stop at the specified frame?

Code:
function moveAnimal (a, f) {
        // first move current animal back into its place
        // and bring the empty movie to the forefront
	if (currentAnimal ne "") {
		_root.forefront_movie.swapDepths(currentAnimal);
	}
        // swap the desired animal with the empty movie in the 
        // forefront
	a.swapDepths(_root.forefront_movie);
	currentAnimal = a;
	gotoAndPlay (f);
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top