stage.addChild and layering
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a simple function that, when you click on a button, adds a movie clip to the stage in a random x and y position. The issue I am having is that the new movie clips eventually cover up the button. I tried to change the z-index of the newly created mc to be below the z-index of the button, but that doesn't solve the problem. How does one stop the new mc's from covering up an element that already exists. friends1_btn.addEventListener(MouseEvent.CLICK, friendMaker); function friendMaker(evt:MouseEvent):void { var newFriend:Teddy = new