Skip to main content
Participant
April 11, 2009
Beantwortet

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)

  • April 11, 2009
  • 3 Antworten
  • 723 Ansichten

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.

Dieses Thema wurde für Antworten geschlossen.
Beste Antwort von funkysoul

not sure about this but what happens if you change your setchildindex to 0? in the navOverF function

3 Antworten

animated_cloud
Participant
October 16, 2009

WOW... I just posted a question about this same drop menu tutorial in the 'Flash Sites' forum. I'm glad it worked out for you! How did you link the MC 'buttons' to Frame Labels?

Ned Murphy
Legend
April 11, 2009

I don't see where you made any changes with respect to the likely problem.

funkysoul
funkysoulAntwort
Inspiring
April 11, 2009

not sure about this but what happens if you change your setchildindex to 0? in the navOverF function

Participant
April 11, 2009

it worked! thank you, thank you, thank you!!!!!