我创建了一个 Flash 文档,但出现此错误
TypeError:错误 #2007:参数 child 必须为非空。在 Flash.display::DisplayObjectContainer/setChildIndex() 在 VersiontwoFlashwebsite_fla::MainTimeline/navOverF()
我不完全理解它,所以任何帮助都会很棒......这是我认为错误所在的代码......
import flash.filters.GlowFilter;
import flash.events.MouseEvent;
import flash.display.MovieClip;
var navBtnGlow:GlowFilter = new GlowFilter(0x999999,0.5,0,15,1,2,true,false);
mc_navbar.addEventListener(MouseEvent.MOUSE_OVER, navOverF);
mc_navbar.addEventListener(MouseEvent.MOUSE_OUT, navOutF);
function navOverF(event:MouseEvent):void
{
event.target.filters = [navBtnGlow];
mc_navbar.setChildIndex(event.target as MovieClip, 1);
dropdown.gotoAndStop(mc_navbar.getChildAt(1).name);
}
function navOutF(event:MouseEvent):void
{
event.target.filters = [];
}