Copy link to clipboard
Copied
Hello all,
I've got a file on working on that has 4 different movie clips on one layer that, when clicked, will zoom in (made with tweens in the timeline).
The issue I'm having, is that when I click one of them, they are arranged in a way that won't work for what I need. I click one, and it works, but it is hidden by the movie clip that is on top of it in the heirarchy. Click another, zooms in, but is partially hidden by another one.
My question is: Is there anyway in AS2 to code these so that when one is clicked, it will the top spot in the heriarchy? So that I can code them all like this so that whenever one is clicked, it goes to the top so it is not hidden?
Thanks
you can use a number, too. for example:
mc.onRelease=function(){
this.swapDepths(this._parent.getNextHighestDepth());
}
Copy link to clipboard
Copied
use the swapDepths() method on each movieclip
Copy link to clipboard
Copied
Correct me if I'm wrong, but isn't that just used to swap 2 movie clips?
Or is there a number I can input instead of the movie clip name that will change all of them?
Copy link to clipboard
Copied
you can use a number, too. for example:
mc.onRelease=function(){
this.swapDepths(this._parent.getNextHighestDepth());
}
Copy link to clipboard
Copied
Aha. There we go. That's it! I appreciate it!
Copy link to clipboard
Copied
you're welcome.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now