mercredi 30 décembre 2015

ERRORS 1009 & 2007 in AS3

I'm doing a website with Flash. The main page is a skeleton, with a top bar (with the links to different sections) and footer (with links to other websites).

I have issues trying to load the other sections (swf files) inside this main skeleton. When I try I get both errors, 1009 and 2007. I cannot see the problem.

This is the code:

var mcHome: MovieClip;

    var load: Loader = new Loader();
    load.contentLoaderInfo.addEventListener(Event.COMPLETE, homeLoaded);
    load.load(new URLRequest("homePage.swf"));


    function homeLoaded(e: Event): void {
        mcHome = MovieClip(load.contentLoaderInfo.content);
        load.contentLoaderInfo.removeEventListener(Event.COMPLETE, homeLoaded);
        addChild(mcHome);
        mcHome.x = 9;
        mcHome.y = 208;
    }

        //DESIGNERS BUTTON

        des_menu.addEventListener(MouseEvent.CLICK, designersLoaded);
        function designersLoaded(event:MouseEvent):void 

{
            mcHome = MovieClip(load.contentLoaderInfo.content);
            load.load(new URLRequest("designersJ.swf"));
            removeChild(mcHome);
            addChild(mcHome);
            mcHome.x = 9;
            mcHome.y = 208;
        }


    (...)

Can someone help?

Aucun commentaire:

Enregistrer un commentaire