RangeError: Error #2006

Hi,
I get this error when i add this line of code to my project,
video.attachCamera(camera);// when i comment this line, all is fine.
Full error is like this
RangeError: Error #2006: The supplied index is out of bounds.
    at flash.display::DisplayObjectContainer/getChildAt()
    at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::createContentPane()[E:\dev\3.0.x\frameworks\pr ojects\framework\src\mx\core\Container.as:4654]
    at mx.core::Container/createOrDestroyScrollbars()[E:\dev\3.0.x\frameworks\projects\framework \src\mx\core\Container.as:4400]
    at mx.core::Container/createScrollbarsIfNeeded()[E:\dev\3.0.x\frameworks\projects\framework\ src\mx\core\Container.as:4349]
    at mx.core::Container/createContentPaneAndScrollbarsIfNeeded()[E:\dev\3.0.x\frameworks\proje cts\framework\src\mx\core\Container.as:4165]
    at mx.core::Container/validateDisplayList()[E:\dev\3.0.x\frameworks\projects\framework\src\m x\core\Container.as:2689]
    at mx.managers::LayoutManager/validateDisplayList()[E:\dev\3.0.x\frameworks\projects\framewo rk\src\mx\managers\LayoutManager.as:602]
    at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.0.x\frameworks\projects\frame work\src\mx\managers\LayoutManager.as:675]
    at Function/http://adobe.com/AS3/2006/builtin::apply()
    at mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.0.x\frameworks\projects\framework\sr c\mx\core\UIComponent.as:8460]
    at mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.0.x\frameworks\projects\framework\src \mx\core\UIComponent.as:8403]

Could you be removing children from a container that is being removed from
the display list?

Similar Messages

  • RangeError: Error #2006: The supplied index is out of bounds.

    Hi Guys
    I am making an Auto-Arrange button and clicking on which
    arranges all the children of the container( which are on the main
    stage) in the tile format. Basically on clicking, I manually move
    those child on the stage to particular coordinates as shown in my
    code. I have pasted my code below. My problem is that as soon as i
    click on the auto arrange button I am getting error "RangeError:
    Error #2006: The supplied index is out of bounds.". Please let me
    know what i am doing wrong and i will appreciate if you let me know
    how would i fix this
    Thanks a lot guys
    Anuj
    ******************CODE**********************
    var aa:Number=0;
    var xcoord:Number=-300;
    var ycoord:Number=-200;
    var xcoord1:Number=450;
    var xcoord2:Number=850;
    var xcoord3:Number=1250;
    var ycoord1:Number=350;
    var ycoord2:Number=650;
    //Button Listener
    btn_AA.addEventListener(MouseEvent.CLICK,autoArrange);
    function autoArrange(event:MouseEvent):void
    if(container.getChildAt(aa)!=null)
    container.getChildAt(aa).x=xcoord;
    container.getChildAt(aa).y=ycoord;
    //Arrange Second
    container.getChildAt(aa+1).x=xcoord+xcoord1;
    container.getChildAt(aa+1).y=ycoord;
    //Arrange Third
    container.getChildAt(aa+2).x=xcoord+ xcoord2;
    container.getChildAt(aa+2).y=ycoord;
    //Arrange Forth
    container.getChildAt(aa+3).x=xcoord+xcoord3;
    container.getChildAt(aa+3).y=ycoord;
    //Arrange Fifth
    container.getChildAt(aa+4).x=xcoord;
    container.getChildAt(aa+4).y=ycoord+ycoord1;
    //Arrange Sixth
    container.getChildAt(aa+5).x=xcoord+xcoord1;
    container.getChildAt(aa+5).y=ycoord+ycoord1;
    //Arrange Seventh
    container.getChildAt(aa+6).x=xcoord+ xcoord2;
    container.getChildAt(aa+6).y=ycoord+ycoord1;
    //Arrange Eight
    container.getChildAt(aa+7).x=xcoord+xcoord3;
    container.getChildAt(aa+7).y=ycoord+ycoord1;
    //Arrange Ninth
    container.getChildAt(aa+8).x=xcoord;
    container.getChildAt(aa+8).y=ycoord+ycoord2;
    //Arrange Tenth
    container.getChildAt(aa+9).x=xcoord+xcoord1;
    container.getChildAt(aa+9).y=ycoord+ycoord2;
    //Arrange Eleventh
    container.getChildAt(aa+10).x=xcoord+ xcoord2;
    container.getChildAt(aa+10).y=ycoord+ycoord2;

    Hi Kglad
    Thanks for reply. Can you please do me a big favor of
    modifying the code so that it would not give that range error.
    I am not sure which way to go because manually i put them at
    specific coordinate and i assume if even i place 1 child on my main
    stage it should work without giving me the error but everytime it's
    checking that whether i place 1 childrens on the stage or not.
    Please help me out.
    Thank you very much for ur help
    Regards,

  • Error #2006: The supplied index is out of bounds

    hello,
    i'm trying to addChild with an interval, using this piece of code, but I allways get an error saiyng the suplied index is out of bounds.
    why?
    what should I do to have mc1 added then wait lets say a second and add m2 2 and so on?
    Thanks
    var tempo_espera:Timer = new Timer(1000, 1);
                tempo_espera.addEventListener("timer", inserir);
                tempo_espera.start();
                function inserir(evt:TimerEvent):void {
                    for (var nv1:int = 0; nv1<promocoes.length; nv1++) {
                        holder.addChildAt(mc, nv1);
                        var animacao:TransitionManager = new TransitionManager(mc);
                        animacao.startTransition({type:Zoom, direction:Transition.IN, easing :Elastic.easeOut, duration:3});
    RangeError: Error #2006: The supplied index is out of bounds.
    at flash.display::DisplayObjectContainer/addChildAt()
    at MethodInfo-346()
    at flash.utils::Timer/_timerDispatch()
    at flash.utils::Timer/tick()

    using your new code, I got this error
    TypeError: Error #2007: Parameter child must be non-null.
    at flash.display::DisplayObjectContainer/addChild()
    at MethodInfo-343()
    at flash.utils::Timer/_timerDispatch()
    at flash.utils::Timer/tick()
    I had to add mcArray = new Array(); to avoid another error
    // this is array of movie clips
            var mcArray:Array;
            // it is better to declare variable once and then reinstantiate it
            var mc:MovieClip;
            // do your regular routine
            for (var nv:uint = 0; nv<promocoes.length; nv++) {
                var prm;
                prm = promocoes[nv].split("|sep|");
                mc = new MovieClip();
                mc.name = "mc_"+nv;
                // place this new mc into array
                mcArray = new Array();
                mcArray.push(mc);
            // start timer - note that timer will fire as many times as there are movie clips
            var tempo_espera:Timer = new Timer(1000, mcArray.length);
            tempo_espera.addEventListener("timer", placeClip);
            tempo_espera.start();
            // the clip you will apply transition to
            var currentClip:MovieClip;
            // function that places clips
            function placeClip(e:Event):void {
                // get next clip by calling movie that corresponds with the timer counter
                currentClip = MovieClip(mcArray[tempo_espera.currentCount]);
                // just place next clip
                holder.addChild(currentClip);
                var animacao:TransitionManager = new TransitionManager(currentClip);
                animacao.startTransition({type:Zoom, direction:Transition.IN, easing :Elastic.easeOut, duration:3});

  • TS3694 i have an unknown error 2006. what am i supposed to do?

    I have an unknown error 2006  for my Iphone 5 when I tried doing a recovery mode using itunes. What should I do?

    http://support.apple.com/kb/TS3694#USB

  • IPhone 5 stuck in recovery mode (Error 2006 (Mac) 2009 (Windows)

    Hi everyone, my iPhone 5 has just randomly stopped working. It's out of warranty so Apple won't help at all. The screen just wouldn't turn on at all so I opened it up and checked out all the connections and somehow I got the screen on, when plugged in it shows an iTunes logo so I plugged it into my computer and it said it was in recovery mode. I try to restore and I get Error 2006 on my Mac and Error 2009 on my windows computer. I have tried all different ports and all different lightning connectors to no avail. I have also replaced the battery which didn't help.
    I'm thinking it is the charging port but I'm not sure. Does it seem like I should replace that?

    Your a *******
    Have a great day !!!! Sent from Michael's iPhone ...

  • Ios 8 download error 2006 on iPhone 5

    I am writing this 5 days after the release of ios 8. I have tried to download it about 30 times so far and I keep getting hit with the same errors.
    1. Software Requested
    You will be notified when it is ready to download.....
    2. Update Failed
    Your device failed to update
    3. Error 2006 (only when downloading from the computer)
    Update failed because of an unknown error (2006)
    I have restarted both my iphone 5 and my mac (27 inch imac) multiple times.
    Does anyone have any suggestions?

    I think I found a solution. Try updating from your phone, then plug it into the computer while it is trying to update on your phone and update there too on itunes. That worked for me.

  • IOS 8 update via OTA bricked my iPhone 4s. Error 2006

    iOS 8 update via OTA bricked my iPhone 4s. Error 2006
    Done a update on my iPhone 4s 64GB phone. done it over the air then comes up in recovery mode.  so plugged in iTunes (most up today on a macbook pro) downloaded IOS8 again then when i do a restore it comes up with the error message "The iPhone "IPhone" could not be restored. an unknown error occurred (2006)
    Computer: macbook pro  15" mid 2012
    2nd computer: just been rebuild with windows 7 on it all up today and latest iTunes,
    Cable: 3nd Party
    Cable: Apples down brand only 2 days old as bought this one for in the office, (and seems to work with backing up my iPhone on to my macbook pro)
    also restarted the machines and checked again for any updates  nothing els plugged in to any of the laptops and it makes no change still get the same error message.
    anyone have any clue what is going on.
    also i have never called my iPhone "iPhone" (from the error message) must of been a bad install of ios8 (OTA) to bring that name up.

    My Iphone 5 got stuck right after I installed iOS8 also.  Mine would not let me past the Hello page.  I had an iCloud backup, so this is what I did.
    Downloaded iOS 7.1.2 to my computer. http://www.iclarified.com/750/where-to-download-iphone-firmware-files-from
    Restored My iPhone using iTunes.
    -Launch iTunes
    -Plug phone into computer and hold down the sleep button and wake button on your phone until it shows iTunes restore
    -Hold Shift in windows 7 while you click restore in iTunes
    This will erase everything on your phone and install a fresh version of 7.1.2
    I had an icloud backup so I applied that to get all my files and settings back.  (you can not apply a backup from iOS7 onto iOS8 so that is why I did everything above)
    I then tried to install the iOS8 update from iTunes instead of over the air.  No luck there either.
    I guess I will stick with iOS7 untill the next build.
    I hope this helps.  Remember if you do not have a backup that includes all your pictures and such don't do this Because all will be lost.
    Has anyone else got iOS8 installed just to get stuck on the Hello page?

  • FW update error 2006 on iPhone 3.0 GM

    Hi everybody,
    I've a serious problem with iPhone firmware update. I've a iPhone 3G with original developer OS 3.0 GM and it's never cracked.
    When I've installed MacOs 10.6.2 and iTunes 9.0.3 last version I began to get the first problems with FW update, in fact the process is locked with error 2006 and I cannot update versions upper to my 3.0 GM.
    I tried to change cable, computer (MacPro with MacBook Pro) but the problem is same. There are not other usb devices connect to Mac. I'd like update my mobile to 3.1.3 FW version, How I do?
    Thank you in advance,
    Antonio

    Resolved in DFU mode

  • Ipod Touch Restore Error 2006

    I downloaded ipod touch 3.1 and since then itunes keeps requesting me to restore but have been unsuccessful. I keep receiving "ipod could not be restored. An unknown error 2006."
    I've been through all of apple.com/support and have been unsucessfull with all the recommendations. My ipod looks like this http://support.apple.com/kb/TS1275
    Does anyone have anything useful instead of the generic recommendations (unplug, restart, reinstall, etc...)?
    Please help. I would like to listen to my ipod instead of tinker with it every evening!!!

    Ty DFU mode, see this post: http://discussions.apple.com/thread.jspa?messageID=10457379&#10457379
    Is your ipod connected directly to the USB port?

  • TS3694 how do i fix error 2006?

    i plugg my iphone 4 into the charger and it blinks the apple logo to me. (apprears and disappears) plug it in to itunes and it says error 2006

    How to deal with Error 2006 is explained in the Doc. where you posted this query.
    Quoting part of paragraph:
    If the errors persist on another computer and known-good USB cable, the device may need service.

  • Why is "if (fn_vec.length == 0)" throwing error "RangeError: Error #1125: The index 0 is out of rang

    Why is the statement "if (fn_vec.length == 0)" throwing error "RangeError: Error #1125: The index 0 is out of range 0."?
    fn_vec is a Vector.<Function>, and it's not null.  It's length is in fact zero.
    This makes no sense.

    Hi yu.wei.qian.07,
    the problem with the second block of code is that you are
    enumerating through the children of the canvas using their index
    number. The problem with this is that you are removing children
    from the canvas. When you remove a child from a parent object the
    index is recalculated and ultimately the number of children for
    that parent object is reduced by 1. Since you are starting at zero
    and going forward through the loop index you are reaching the last
    child index about half way through the loop. A way that would
    probably work to fix this would be to loop backwards through the
    children (ie start at the last index and loop back to index 0).
    I hope this helps.

  • How to solve? RangeError: Error #1506: The specified range is invalid.

    I complie a c library with alchemy, there are some errors in a function, and the flash traces:
    "RangeError: Error #1506: The specified range is invalid."
    I have set the CLibInit as global, only call the init() function ONCE as other said, but it didn't work.
    I think that maybe the reason is out of heap/stack memory in some c functions???
    or..??
    Help me !!!
    How to solve it...!!!
    Thank you

    This error is result of accessing an invalid memory pointer.  You have likely corrupted alchemy, or are accessing an uninitialized or null pointer.
    I'm not sure if this also happens in the case of a link problem.  The linker does not complain if methods are missing.  But, I thought that was a different error.

  • Iphone 3gs getting error 2006 ?

    Hello,
    I have 16gb iphone 3gs stuck in reboot loop. When i put in recovery mod i want to restore getting error 2006 again and again .
    Please help me.

    Disconnect third-party devices, hubs, spare cables, displays, reset the SMC, and then try to restore:
    http://support.apple.com/kb/HT3964

  • HFR error 2006

    hi,
    When I run a report in HFR 11..1.2 ,it is giving an "2006 : Remote server exception has occurred. Please review client and server logs for details".
    Can anyone reply me with ,ehat is this?

    Have a read of the following docs in Oracle Support
    Error 2006: Remote Server Exception Has Occurred [ID 1175913.1]
    Financial Reporting (FR) "Error Number 2006: Remote Server Exception Has Occurred. Please Review Client And Server Logs For Details" [ID 1272639.1]
    Error: "2006 Remote server exception has occurred" After Members In Financial Reporting (FR) Reports Have Been Modified In The Data Source [ID 1470787.1]
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Help - Unknown Error 2006 "iPhone could not be restored"

    Hi there - has anyone else been plagued with this? I tried to sync my iPhone 3G (less than a year old) and it wouldn't sync. I tried to restore it and it went partially through the process and bailed returning an error. I went to the discussion boards who recommended (not necessarily in this order) rebooting, using a different USB cable, a different computer, reinstalling iTunes, turning off Little Snitch, turning off Firewall, using an on-board USB port. Absolutely NOTHING worked and my phone is bricked. Now, despite everything all I get is "iPhone" could not be restored An unknown error occured (2006).
    Can anyone help?

    Close iTunes and unplug iphone
    Search web and download the 2.2.1 ipsw file.
    Go to device manager on PC and delete the USB option for Apple under the hardware options.
    Reboot PC
    Plug in iphone and wait for dreaded connection picture
    hold power button and home button until apple logo appears
    continue to hold home button and release power button until connection picture appears again
    Your PC should now find the iphone in recovery mode
    Now open iTunes and it will prompt you to restore
    Hold the shift button on the keyboard and click the restore button at the same time
    This will allow you to browse for the correct ipsw file
    select the 2.2.1 file that you downloaded
    your iphone will now restore
    Once completed, you will need to resync
    Now you are back to square one but at least have a phone that works
    Now make an appt at the Genius Bar and make them update it for you
    Mine is scheduled for next week

Maybe you are looking for

  • Nothing is working

    Ive had itunes on my computer since june 2 weeks ago I downloaded itunes 6 and now my itunes wont open. Ive tried everything from rebooting my computer to uninstalling and reinstalling. No error message shows up itunes just wont open. My quicktime op

  • Where XI payload gets stored in SAP

    Hi, Can any one help me to find out tables used to store XI payload data in backend. I believe message header details can only be visible in ABAP tables.. where as actual message payload gets stored in database system. If my understanding is correct,

  • Oracle ADF for weblogic server

    Hi, Can I extend weblogic domain to include Oracle ADF my version of weblogic is 10.3.0.0 Thanks, Charan

  • Internal table problem for BDC

    Hai i am having flatfile like this format H   text1   1000   plant_name   10 short_text   X     X                                                  20 short_text   X     X                                                  30 short_text   X     X H   te

  • DCA-CONNECTION_LOOKUP_FAILED: Failure looking up the repository connection

    Using Jdev 10.1.3.2, we created a Data Control on Oracle Content DB 10.2 and used it to add content of a folder as table to a jspx page. The page run correctly from webcenter preconfigured OC4J. However, we encounter the following DCA error message w