Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Changing depths of movie clips with button clicks

Guest
Jul 11, 2013 Jul 11, 2013

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

TOPICS
ActionScript
650
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 11, 2013 Jul 11, 2013

you can use a number, too.  for example:

mc.onRelease=function(){

this.swapDepths(this._parent.getNextHighestDepth());

}

Translate
Community Expert ,
Jul 11, 2013 Jul 11, 2013

use the swapDepths() method on each movieclip

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 11, 2013 Jul 11, 2013

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 11, 2013 Jul 11, 2013

you can use a number, too.  for example:

mc.onRelease=function(){

this.swapDepths(this._parent.getNextHighestDepth());

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 11, 2013 Jul 11, 2013

Aha. There we go. That's it! I appreciate it!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 11, 2013 Jul 11, 2013
LATEST

you're welcome.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines