私はその中にボタンがあるメニューMovieClipを持っています。私はMousEvent.CLICKのメニューを持っていて、あなたがクリックしているものを登録する方法を考えようとしています。うまくいけば私はこれについて効率的だ...ありがとう!AS3:クリックしている子オブジェクトを見つける
private function menu_CLICK(e:MouseEvent):void
{
//this is where I need help on
switch (????)
{
case "books" :
showSection("books")
break;
case "music" :
showSection("music")
break;
default :
}
}
private function showSection(section:String)
{
switch (section)
{
case "books" :
trace("books");
break;
case "music" :
trace("music");
break;
default :
}
}
は、マウスイベントの場合 'target'、 'currentTarget'、 'getObjectsUnderPoint()'などを表示します。プライベート関数menu_CLICK(e:MouseEvent):void {trace(e.currentTarget.name); } –