Preloader is running on top of the external SWF

I have a very simple preloader that loads an external SWF. It almost works. :-)

I find that the external SWF appears in the window - good - but the preloader continues to run on top of it - bad. I have attached the actionscript code that is in my preloader...

To see it in action, go HERE.

Thanks in advance!
-bryan

================================================

Thank you very much. But I think that I'm not sure why the progress bar is HERE. If the SWF file is loaded and appears in the window, why is the progress bar still there and running? Why didn't he go away? The progress bar is correct, and the SWF file is displayed even if it is only partially charged?

I finally subordinate the visibility of the external SWF that it is fully charged - so bytesLoaded file< bytestotal,="" then="" the="" swf's="" visibility="" is="" set="" to="" false.="" maybe="" that's="" just="" kludge,="" but="" it="">

Again, thank you for answering my question!

Tags: Adobe Animate

Similar Questions

  • Preloader which modifies the external SWF files every 5 seconds

    Hello

    I made a web banner in flash that loads an external swf and another external swf changes after 5 seconds. The banner have a preloader, but the problem becomes when you load the first time. As sovereign wealth funds are not cached in the cache of the browser and yet, time 5 seconds start counting from the preloader, and when the external swf file, shows only 1 second rest and it is replaced by another. There is a way to 'freeze' the time for each external swf until it loads completely?

    The code that loads SWFs every 5 seconds (this code is placed in a layer of action):

    start of the code:

    var intervalId: number;
    var: number = 0;
    var maxCount:Number = 23;
    var duration: number = 0;
    var banners: Array = new Array)
    "abatrade.swf,"
    "bancobrasil.swf,"
    "caparao.swf,"
    "cedro.swf,"
    "cesama.swf,"
    "copasa.swf,"
    "damatta.swf,"
    "emtel.swf,"
    "engedrain.swf,"
    "extel.swf,"
    "feedback.swf,"
    "iti.swf,"
    "intermedium.swf,"
    "magnesita.swf,"
    "maquenge.swf,"
    "maxxdata.swf,"
    "orteng.swf,"
    "paiva.swf,"
    "paraibuna.swf,"
    "paraopeba.swf,"
    "sabesp.swf,"
    "serpro.swf,"
    "soll.swf,"
    'thawte.swf '.
    );

    function executeCallback(param:String) {}
    var duration: number = 5000;
    loadMovie (banners [count], loadmovie_mc);
    loadmovie_mc._x = 0;
    loadmovie_mc._y = 0;

    clearInterval (intervalId);
    if(Count < maxCount) {}
    Count ++;
    intervalId = setInterval (Thi, "executeCallback", duration, banners [count]);
    }
    else {}
    Count = 0;
    intervalId = setInterval (Thi, "executeCallback", duration, banners [count]);
    }
    }

    If (intervalId! = null) {}
    clearInterval (intervalId);
    }

    intervalId = setInterval (Thi, "executeCallback", duration, banners [count]);

    end of the code
    ----------------------------------------

    And the code to the preloader (this code I place in the movieclip that loads external SWF files):

    start of the code:

    {onClipEvent (enterFrame)}
    var gtT:Number = this.getBytesTotal ();
    var gtL:Number = this.getBytesLoaded ();
    var gtP:Number = int ((gtL/gtT) * 100);
    If (TWG > gtL) {}
    This ._alpha = 0;
    _root. Loader._alpha = 100;
    _root. Loader.bar._width = gtP;
    clearInterval (intervalId);
    } else {}
    This ._alpha = 100;
    _root. Loader._alpha = 0;
    intervalId = setInterval (Thi, "executeCallback", duration, banners [count]);
    delete onEnterFrame;
    }
    }

    end of the code

    Note that I tried to freeze the time using a clearInterval does in the second code, but he simply doesn't work...

    Any ideas? Thank you

    Edson

    Here's the correct code kglad send me. Thank you very much!

  • Problem with the playback of the external SWF sound

    Hello

    I need to load the external SWF file, which contains the simple + audio image sequence. I used the MovieClipLoader class for this and also a preloader, where I check if I can run the SWF safely, without having to pause later and continue with loading. It works similar to video YouTube, where the video is buffered.

    The problem is that when I load the SWF file and run it, the audio start to play later. I tried more cases and the reason is that even if I load enough of the SWF, I can be certain I can start reading, because it is not enough for audio, if you start playing a little later. When I insert more, the audio begins to play immediately.

    So the question is, is there a way how can I check if the audio is loaded and ready to play?

    Thank you

    Michal

    If you can inspect the external swf fla enough to know that synchronize sound is set to stream, you should be able to look at the scenario where the sound is attached and determine the number of images, the sound is.

  • Loading and unloading of the external swf with buttons

    Alright. Here's the deal. I have 7 buttons on my main page, on the left side of the screen. I want the buttons to the external swf on the right to load and unload then when you push a different button. Should I make a table? Do I need a clip vacuum film to load each swf in?

    ///////////////Buttons/////////////////////

    graphics - load the thumbnail scroll bar

    mixed technique - load the thumbnail scroll bar

    photography - load the thumbnail scroll bar

    illustration - charge the miniature scroll bar

    Words - list history of charges

    Contact - contact information of charges

    charges about - bio

    ////////////////////////////////////////////

    Thanks for any help.

    If you are unable to publish for flash player 10, you will need to use the instead of unloadAndStop() unload() method.

  • How to use the external swf semi-transparent mask?

    I want to use the external swf semi-transparent mask for the smooth transition. I use

    clip.cacheAsBitmap = true;

    mask.cacheAsBitmap = true;

    clip.setMask (mask);

    Everything works fine. But when I use

    loadMovie ("http://www.url.com/movie.swf", "_root.clip");

    clip.cacheAsBitmap = true;

    mask.cacheAsBitmap = true;

    clip.setMask (mask);

    It does not work... What am I doing wrong?

    Well, if your loadMovie is on the same timeline as the code that you set as a mask, then you need not _root.

    And sorry, I forgot, there was a problem with the main mc of masking that loadMovie is load in. While I was doing was putting clip inside another mc and called as well as mc 'container' then my code would look like:

    masker.cacheAsBitmap = true;

    container.cacheAsBitmap = true;

    container.setMask (masker);

    container.clip.loadMovie ("movietoload.swf");

    Download two attached SWF files and open the main.swf to see.

  • poor quality than the external .swf

    Is this possible?

    using my main swf file, I want to load an external swf.

    I put the external swf to play in low quality with:

    _quality = "low";

    but when I play the main swf file, two video clips seem to inherit the same parameter.  They both play at the same quality.

    Can I do the main swf play high quality or average, while the external swf is down?

    Thank you

    Yes, you can do.

  • How to determine the total number of images in the external .swf file loaded

    I have to be able to load both external .swf files and make them play in order. To do this, I need to know the number of images in the first .swf file so I can check _currentframe against _totalframes to determine when he is finished playing so that I can load another.

    Most of the stuff I see indicate that _totalframes on an external .swf can be determined by loading the .swf in a container clip and then check using a listener in the .onLoadInit. Like this:

    ------------------------------------------------------------------------------------------ ----------------------------

    this.createEmptyMovieClip ("tester_mc", 1);
    var mcListener:Object = new Object();

    mcListener.onLoadInit = {function (target_mc:MovieClip)}
    target_mc.onEnterFrame = function() {}
    If (this ._currentframe > = this ._totalframes) {}
    trace ("total frames =" + this ._totalframes);
    delete this.onEnterFrame;
    } else {}
    trace (target_mc._currentframe + "OF" + target_mc._totalframes);
    }
    }
    }

    var test_mc:MovieClipLoader = new MovieClipLoader();
    test_mc. AddListener (mcListener);
    test_mc.loadClip ("Ad_Group.swf", tester_mc);

    ------------------------------------------------------------------------------------------ -------------------------------------

    Unfortunately, this doesn't seem to work. The trace will always return a total number of frames of 1.

    I guess it's because the container clip has only 1 frame, and the external .swf timeline seems to be ignored.

    I would appreciate any ideas on how to raise the total number of frames of an external .swf file or, Alternatively, put it another way when it's done playing. (Not only the loading, but play until the end.)

    TIA,

    C

    I guess it's because the container clip has only 1 frame, and the external .swf timeline seems to be ignored.

    I wouldn't imagine. My guess is that the main scenario for the external swf file has only 1 frame and the rest of the animation is inside a movieclip in this timeline. You publish this swf? Can you open the FLA and check how many images is open on the main timeline?

    The approach that you have mentioned is about what there is. But he knows check a chronology. If there are many nested movieclips, it may be impossible to understand what timeline you really want to be 'THE' full chronology.

    If you have the FLA, you can have the video call function on the _root timeline which tells the main swf that has completed a movieclip or something like that.

    Also, I have in my head somewhere that I recently saw something that someone made similar to this one, but do not remember... If it appears in my head that I will post.

  • MainTimelime ContextMenuItem MENU_ITEM_SELECT event not sent the magazine containing the external SWF

    1. custom context menu applied to MainTimeline
    2. using a Loader() to load an external SWF and have it added to its container display string
    3. Make a right-click SWF loaded menu contextual custom appears, but the MENU_ITEM_SELECT events are not dispatched when the user clicks on the items
    4. click right on elsewhere in the parent SWF works great, even on deep nested objects (not externally loaded)
    5. Remove loaded SWF of the display string and right clicking in its location very good

    I managed to find a hack . On the charger () parent display object, I put:

    .mouseEnabled = false;

  • How to make reference to the external SWF file using if statement?

    I have a main swf file that loads several external SWF file when the user clicks a menu button. Now I want to target a specific swf file to Add an extra library child or of another swf when this specific swf file is loaded. How should I do? What should I put in the stated case?

    ///////////////////////////////////////////////////////////

    var newswf:URLRequest = new URLRequest (".") ("/ swf /" + event.target.name + ".swf");

    Loader.Load (newswf);

    addChild (loader); dynamically load SWFs

    If (newswf == ".") ("/ SWF/pubResCHETNA.swf ') //error here

    {

    FC.buttonMode = true;

    FC.addEventListener (MouseEvent.CLICK, full screen);

    }

    function fullScreen(e:MouseEvent):void

    {

    var loaderF:Loader = new Loader();

    loaderF.load (new URLRequest ("PopupFullscreen.swf"));

    addChild (loaderF);

    }

    ////////////////////////////////////////////////////////

    The State must be newswf.url == the path. However I store event.target.name as a variable and use it in the State. You use "." for your path so the condition probably will always fail.

    --

    Kenneth Kawamoto

    http://www.materiaprima.co.UK/

  • How to unload the external .swf file when pass the other section?

    Hello

    The following code provided by Mr. kglad works very well to load an external .swf file on stage. Now, when I click on Contact (button), the file external .swf to disappear completely. How to encode on contact (button) to get by.

    Gallery.addEventListener (MouseEvent.CLICK, GalleryClick);

    function GalleryClick(e:Event):void {}

    If (currentClip! = Gallery_mc) {}

    currentClip.visible = false;

    Gallery_mc. Visible = true;

    currentClip = Gallery_mc ;}

    var loader: Loader = new Loader();

    loader.contentLoaderInfo.addEventListener (Event.COMPLETE, ClipLoaded);

    Loader.Load (new URLRequest ("Gallery.swf"));

    function ClipLoaded(e:Event):void {}

    Gallery_mc. AddChild (Loader);

    Loader.x = 0;

    Loader.y = 120;

    Loader.Width = 1000;

    Loader.Height = 700

    }}

    I tried the following code for Contact_btn unload the Gallery.swf file that launches an error message: 1120: access of undefined property loader.

    Contact.addEventListener (MouseEvent.CLICK, ContactClick);

    function ContactClick(e:Event):void {}

    If (currentClip! = Cotnact_mc) {}

    currentClip.visible = false;

    Cotnact_mc. Visible = true;

    currentClip = Cotnact_mc;

    Gallery_mc.removeChild (loader);}}

    unloadAndStop() is supported by flash player 10 or higher (fp 10 +).

    p.s. Please check the useful/correct, if there is.

  • How to resize the external .swf files?

    Hello

    THA following the code is to resize the video Clips which are on stage. But how can I resize externally. SWF files? I am adding an external .swf file through Gallery_mc.addChild (loader);

    The following code works very well for resizing of video Clips on stage:

    var myStage:Stage = this.stage;

    myStage.scaleMode = StageScaleMode.NO_SCALE;

    myStage.align = StageAlign.TOP_LEFT;

    function initialDisplay(event:Event):void {}

    var swfWidth:int = myStage.stageWidth;

    var swfHeight:int = myStage.stageHeight;

    Gallery_mc. Width = swfWidth;

    Gallery_mc. Height = swfHeight ;}

    addEventListener (Event:ENTER_FRAME, initialDisplay);

    Help, please.

    Thank you.

    It is not supposed to resize an external swf, unless you load it.  If you load, use a complete listener to resize:

    var loader: Loader = new Loader();

    loader.contentLoaderInfo.addEventListener (Event.COMPLETE, f);

    Loader.Load (new URLRequest ("swf1.swf"));

    function f(e:Event):void {}

    addChild (loader);

    Loader.Width = Whatever;

    etc.

    }

  • hide the external swf movie clip

    Hello.

    I have my main.swf and in the second frame, I load an external swf called first.swf with this method:

    [AS] var loader: MovieClipLoader = new MovieClipLoader();

    this.createEmptyMovieClip("myGalleryContainerproducts",5);

    myGalleryContainerproducts._lockroot = true;

    loader.loadClip ("first.swf", myGalleryContainerproducts);

    myGalleryContainerproducts._y = 86;

    myGalleryContainerproducts._x = 50;

    [/ ACE]

    In first.swf, I have two clips with instance names ena and dyo

    I want in main.swf in the third frame to hide these clips of first.swf (only the movie clips is not the entire .swf) or move (change x and y values) so they hide practically.

    All solutions?

    Thanks in advance

    After the ena and dyo are instantiated, you can use:

    myGalleryContainerproducts.ena._visible = false

    myGalleryContainerproducts.dyo._visible = false;

  • Unloading of an external SWF that is loaded with a close button on the external SWF to unload

    I found a discussion on this topic, but I still have problems to work and was hoping to get some help here.

    Here, I have a file: http://www.dril-quip.com/test/main.swf

    I: main.swf (menu) and I module.swf (content)

    If you go to the wellhead systems/SS-15 BigBore II submarine and click on I have to load an external swf which covers most of the parent company.

    So far so good. My problem drains the loaded swf to 'Child' with the button provided on the loaded swf to 'Child'.

    Here is the code that I used to upload the file but I can't, for the life of me, find a way to unload.

    var bigboreLoader:Loader = new Loader();
    btnbb2.addEventListener (MouseEvent.MOUSE_UP, bigborecontent);

    function bigborecontent(event:MouseEvent):void {}
    var bigboreRequest:URLRequest = new URLRequest ("moduletemplate.swf");

    bigboreLoader.load (bigboreRequest);
    stage.addChild (bigboreLoader);

    I am sure that it requires the child to communicate with the parent somehow, but I'm at a loss. If I could get a bit of advice or a link to something to deal with this, it would be a great help. I just need to have my links loading my modules and remove it when the narrow buttong is struck on the loaded swf file. I promise you that I did some research and I confess that I found asnwers, but still they do not work. I found the code below:

    Main FLA:

    function removeF() {}

    removeChild (bigboreLoader);

    }

    var bigboreLoader:Loader = new Loader();
    btnbb2.addEventListener (MouseEvent.MOUSE_UP, bigborecontent);

    function bigborecontent(event:MouseEvent):void {}
    var bigboreRequest:URLRequest = new URLRequest ("moduletemplate.swf");

    bigboreLoader.load (bigboreRequest);
    stage.addChild (bigboreLoader);

    EXTERNAL FLA:

    btnClose2.addEventListener (MouseEvent.CLICK, bigborecontent);

    function bigborecontent(myevent:MouseEvent):void {}

    MovieClip (parent.parent) .removeF ();

    }

    I think I have a poor understanding of the code. Thanks for any help you might be able to provide.

    again, this code should all be on the same timeline as btnbb2. in main.fla.

    var bigboreLoader:Loader = new Loader();
    btnbb2.addEventListener (MouseEvent.MOUSE_UP, bigborecontent);


    function bigborecontent(event:MouseEvent):void {}
    var bigboreRequest:URLRequest = new URLRequest ("moduletemplate.swf");
    bigboreLoader.load (bigboreRequest);
    addChild (bigboreLoader);

    }

    function removeF() {}

    removeChild (bigboreLoader);

    }

    /////////////////////// end main.fla code ///////////////////////////////////////

    This code should all be on the main timeline in FLA EXTERNAL.

    and btnClose2 should be placed on the main timeline in your external fla. //

    btnClose2.addEventListener (MouseEvent.CLICK, bigborecontent);

    function bigborecontent(myevent:MouseEvent):void {}

    MovieClip (parent.parent) .removeF ();

    }

    end external fla code.

  • With the help of a button to load and unload the external SWF in AS3?

    How can I use a button to load and unload a sequence of external SWF files, as a Next button and previous?

    I don't know if it will work because apparently you are trying to load a swf AS1/2, but try

    change the line to be...

    _swfTempClip = MovieClip (event.target.content);

    If this does not work, then you will need to create _swfTempClip as a new MovieClip and add the event.target.content to this MovieClip using addChild().

  • Stop the sound from the external SWF

    Here's my problem. I have a main.swf and I load an external audio player.swf. I need to stop the player.swf sound when I press a button on the main.swf. Not all the buttons just a few buttons. I have now, I have to put the code in each button. Thank you

    have you tried stopAllSounds()

Maybe you are looking for