Created
June 9, 2014 12:25
-
-
Save mizutanikirin/67975ac1b1672c8b1311 to your computer and use it in GitHub Desktop.
深度を最前面/再背面にする
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// クリックしたら対象mcが最前面になる | |
function clicked(event:MouseEvent):void { | |
var lastIndex:int = container.numChildren - 1; | |
container.setChildIndex(DisplayObject(event.target), lastIndex); | |
} | |
// クリックしたら対象mcが最背面になる | |
function clicked(event:MouseEvent):void { | |
container.setChildIndex(DisplayObject(event.target), 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment