So I reworked my code and it seems clearer but am still getting that "RangeError: Error #2006: The supplied index is out of bounds" nonsense. (CODE + ERROR ATTACHED)
i reworked the code to make it error free. now all we're dealing with is the REANGE ERROR problem. i'm extremely new to flash and am reading people's answers on sites in which they solved this problem, but do not understand what people are saying at all. any help would be greatly appreciated .
let me explain my problem a little better: i am creating a drop down menu. everything is fine UNTIL i go to scroll over the button and get the error. i added inner glow, etc. and all of that works fine. i'm only stuck at where the drop down menu is supposed to descend.
CODE 1 :
var navBtnGlow:GlowFilter = new GlowFilter(0x000000, 0.5, 0, 15, 1, 2, true, false);
navBar_mc.addEventListener(MouseEvent.MOUSE_OVER, navOverF);
navBar_mc.addEventListener(MouseEvent.MOUSE_OUT, navOutF);
function navOverF(event:MouseEvent):void{
event.target.filters = [navBtnGlow];
navBar_mc.setChildIndex(event.target as MovieClip, 1);
dropMenus_mc.gotoAndStop(navBar_mc.getChildAt(1).name);
trace("We are Rolled Over..." + navBar_mc.getChildAt(1).name)
}
function navOutF(event:MouseEvent):void{
event.target.filters = [];
}
ERROR:
RangeError: Error #2006: The supplied index is out of bounds.
at flash.display::DisplayObjectContainer/setChildIndex()
at NEWprim_fla::MainTimeline/navOverF()
thank you for your help in advanced.