Help finding what's slowling this slideshow script

Hi !

I’m using an external swf to display a slideshow in a main project and since I’m using it, it’s somehow slows my animation, that’s annoying.
What did I do wrong ?

The code seems so simple i’m maybe missing something really easy to find.

Thank you !


package classes
{
    import flash.display.MovieClip;
     import flash.display.Loader;
    import flash.display.LoaderInfo;
    import flash.events.*;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.utils.Timer;
    import caurina.transitions.Tweener;
    
    public class PRODUITS extends MovieClip
    {
        var xmlLoader:URLLoader;
        var theXML:XML;
        var photos:XMLList;
        var photoLoader:Loader;
        var photoArray:Array;
        var curr:Number;
        var timer:Timer;


        public function PRODUITS():void
        {
            xmlLoader = new URLLoader();
            xmlLoader.load(new URLRequest("xml/A_PRODUITS.xml"));
            xmlLoader.addEventListener(Event.COMPLETE, getXML);
            photoArray = new Array();
            curr = 0;
            timer = new Timer(5000);
            timer.addEventListener(TimerEvent.TIMER, switchPhoto);

        }
        
        private function getXML(e:Event):void
        {
            theXML = new XML(e.target.data);
            photos = new XMLList(theXML.photo);
            for(var i:int=0;i<photos.length();i++)
            {
                photoArray.push(photos*[email protected]);
            }
            timer.start();
            switchPhoto(null);
        }
        
        private function switchPhoto(e:TimerEvent):void
        {
            if(curr < photoArray.length)
            {
                photoLoader = new Loader();
                photoLoader.load(new URLRequest(photoArray[curr]));
                curr++;
                photoLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, removeTimey);
            }
            else
            {
                curr = 0;
                switchPhoto(null);
                photoLoader.unload();
            }
        }
        

        private function removeTimey(e:Event):void
        {
            photoLoader.x= 0;
            photoLoader.y= 0;
            photoLoader.alpha = 0;
            addChild(photoLoader);

            Tweener.addTween(photoLoader, {alpha:1, time:1, transition:"linear"});     
            photoLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, removeTimey);


        }        
        
    }
}