mercredi 23 novembre 2016

why 2nd external swf file not unloaded?

after unloading the first swf file then load 2nd. debugger output show unload message. but when 2nd file unload that time debugger output not showing unload message. why ? but i watch that file has been unloaded in my view

        stop();
    SoundMixer.stopAll();
    var myLoader: Loader = new Loader();
    loadThis();
    function loadThis(): void {
        SoundMixer.stopAll();
        myLoader.load(new URLRequest("intro page.swf"));
        myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
        myLoader.addEventListener("AllBooks", killLoadedClip1);

    }
    function onCompleteHandler(loadEvent: Event): void {
        addChild(myLoader);
    }
    function killLoadedClip1(e: Event): void {
        myLoader.removeEventListener("AllBooks", killLoadedClip1);
        myLoader.unloadAndStop(true);
        loadThis2();
    }
    function loadThis2(): void {
        SoundMixer.stopAll();
        myLoader.load(new URLRequest("class 3 home page 2016.swf"));
        myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
        myLoader.addEventListener("AllBooks2", killLoadedClip2);
    }
    function killLoadedClip2(e: Event): void {
        myLoader.removeEventListener("AllBooks2", killLoadedClip2);
        myLoader.unloadAndStop(true);
        loadThis3();
    }
    function loadThis3(): void {
        SoundMixer.stopAll();
        myLoader.load(new URLRequest("sub home page.swf"));
        myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
        myLoader.addEventListener("AllBooks2", killLoadedClip3);
    }
    function killLoadedClip3(e: Event): void {
        myLoader.removeEventListener("AllBooks3", killLoadedClip3);
        myLoader.unloadAndStop(true);
    }

The OUTPUT Messages are :

   Attempting to launch and connect to Player using URL         C:\Users\Bijoy\Desktop\new ins\Class3.swf
   [SWF] C:\Users\Bijoy\Desktop\new ins\Class3.swf - 1975 bytes after decompression
   [SWF] C:\Users\Bijoy\Desktop\new ins\intro page.swf - 273304 bytes after decompression
   [SWF] C:\Users\Bijoy\Desktop\new ins\class 3 home page 2016.swf - 5746128 bytes after decompression
   [UnloadSWF] C:\Users\Bijoy\Desktop\new ins\intro page.swf
   [SWF] C:\Users\Bijoy\Desktop\new ins\sub home page.swf - 954649 bytes       after decompression
  Debug session terminated.

Aucun commentaire:

Enregistrer un commentaire