After about 15 images, loader.loadBytes loads empty image and throws runtime error

Hello,
I´ve spent about 5 full days already trying to catch this runtime error and my boss is anxiously waiting for this. I´m pretty new to posting, so please pardon me, if I´m not doing it correctly.

I let the user upload fotos, load them immediately, then load filereference.data with loader.loadBytes. It works fine for the first 15 - 18 photos, then the loader fires the complete event and the loader is empty, even though it had data in it, when calling loadBytes. At the same time I get a runtime error in Internet Explorer with no specifics. I have a try catch and eventListeners trying to catch the error, but haven´t caught it.

I´ve found an alternative to using loader.loadBytes by using flex with an Image tag, using image.src = fileReference.data, but I have not used flex before, and don´t know, how to insert that into my multiple file upload. I don´t know, if it would prevent the error either. I am using FlashDevelop, but have only used it for as3 before.

I´ve come across an old post, where someone had a similar problem and was told to put the loader in an array, so it wouldn´t be garbage collected. I´ve tried that, but no success.

I´m not entirely sure, if the loader.loadBytes causes the runtime error, but the empty file always happens right before the runtime error and at no other time.

If anyone has any suggestions, I would be so thrilled.
Here is the url to it:
http://www.artido.de/manager/calendar/Poster/index.php

Here is a part of the code:

if (arrTempFileRefs[imgPos].data != null)
            {
                try {
                    loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, imageProgress_Handler);            
                    loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, imageSecErrorHandler);                    
                    loader.contentLoaderInfo.addEventListener( IOErrorEvent.IO_ERROR, imageIOErrorHandler );                
                    loader.contentLoaderInfo.addEventListener ( Event.COMPLETE, onImageLoaded ) ; 
                    
                    //create the fake holder
                    fakeHolder = new Sprite();                    
                    //and add to it the loader
                    fakeHolder.addChild(loader);

                    loader.loadBytes(arrTempFileRefs[imgPos].data); 
                    
                }catch(e:ArgumentError) {
                    this.Debug("loadNextImageError"+e.toString());
                    boolReady_to_loadnextPhoto = true;
                    loadNextImage();
                
                }catch(e:IllegalOperationError) {                   
                    this.Debug("loadNextImageError"+e.toString());
                    boolReady_to_loadnextPhoto = true;
                    loadNextImage();
                    
                }catch(error:Error) {                    
                    this.Debug("loadNextImageError"+error.toString());
                    boolReady_to_loadnextPhoto = true;
                    loadNextImage();
                }
            }