Ciao a tutti!
Sono sempre alle prese con la mia galleria XML.
Questa mattina, appena svegliato, sono andato a vedere tutto contento la mia galleria che APPARENTEMENTE non doveva avere più problemi e invece.....ho un:

ArgumentError: Error #2025: Il valore fornito per DisplayObject deve essere un elemento secondario del chiamante.
at flash.display:isplayObjectContainer/getChildIndex()
at Gallery/removePellicola()
at MethodInfo-352()

Il codice è il seguente:
Codice PHP:
function onImageMouseClick(evt:EventfocusIndex:Number):void{
    
pellicola.visible true;
    
    
    
//Getting the string name of the image
    
var focusImage:String imageStringContainer[focusIndex];
    
    
//create a Loader to load the image, added to the master_mc as a child
    
var imageFocusLoader = new Loader();
    
    
imageFocusLoader.load(new URLRequest(focusImage));
    
    
imageFocusLoader.addEventListener(MouseEvent.CLICKremoveFocusImage);
    
addChild(imageFocusLoader);
    
    
pellicola.addEventListener(MouseEvent.CLICK, function removePellicolaAux(evt:Event):void
                  
removePellicola(evt,imageFocusLoader);    });
    }
//onImageMouseOut


function removePellicola(evt:Eventfocus:Loader):void{
    
removeChild(DisplayObject(focus));
    
pellicola.visible false;
    }
//removeMaschera

function removeFocusImage(evt:Event):void{
    
removeChild(DisplayObject(evt.target));
    
pellicola.visible false;
    }
//removeFocusImage 
L'errore mi viene dato solo su removePellicola e non su removeFocusImage.
Come posso correggere?
Perché ho questo errore?

Thanks!