loading an external swf that loads an object from url

I am trying to load an external swf which in turn automatically load an object. I want the external swf will only be loaded once the object is loaded in it. for now, it loads the external SWF first, then the external swf file loads the object specified in a URL...

exactly.  you will need a preloader that checks if your external swf finished loading its dependent objects.

Tags: Adobe Animate

Similar Questions

  • Loading an external SWF that loads XML

    Hey all, I have a SWF that loads a swf file in that load images from a XML file with Ned Murphy.  I have a new problem with him.  It works everywhere I try except on the Web server.  When I try I get nothing.  It does not seem to load external SWf file or it cannot load the XML file.  I don't know why.  Has anyone encountered this before? Thank you.

    EDIT

    It works if I try the SWF for the Web server but when I embed in an HTML file and run it through a broweser I get nothing.

    If the swf file is one of the html page that incorporates, you might have to adjust how target you files that loads SWFs.

    When you embed a SWF in a web page, whatever is in that loads the swf file must be targeted as if the swf is in the same folder as the html page that got him.  So if the html page uses something like "flash/main.swf" to integrate the SWF of high level, so if the top-level file is loaded another swf from the same flash file that it should also use the "flash/other.swf" without worrying that it is in the same folder on the server.  When it is embedded in the page, it's like being anywhere where this page.

  • 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.

  • It is necessary today ' hui immediate just began to take external swf, add button invisible overlay, click URL

    Hi all

    Let me provide some background information should I try to close on that I'm looking to get this integrated into my website. It came with a recommendation to try CS5 today to see if it will meet the requirement for the moment.

    Here's what I'm trying to do:

    There is a desire to custom SWF files (I think that it is something called Swish files too?) of various sponsors for advertising purposes and place them on my site.  The implementation was direct so that they work through the Web server.

    I tried an example custom to a button on the mouse click, allowing to open a new Web page in CS5 that worked for me.

    My problem is because the SWF files are finalized, there is no way to put URL information in these files.  After a lot of searching around today, it seems that the best way to redirect a user during a click video must:

    (1) open a new Flash

    (2) import the SWF video file in the project

    (3) create a button Invisible above the video SWF, so when the user clicks, they are redirected to a specific URL.

    But for some reason, when I tried to overlay with an example of SWF file I imported, there was all this going glitter where both have been made transparent to another on the screen - not to mention the video was not visible at all.  My hope is that the SWF video can be seen clearly while the button remained invisbile to manage the click on the video.

    Is there someone on the forum who is able to guide me fairly quickly with a fast-path procedure so that I can try it?  If it works for me, so I want to get the full product and start doing a deep dive into what seems to be a tool very awsome.

    Thank you for your help and your help.  I greatly appreciate it...

    Steven

    then he does ' t matter where the swf file is stored as long as you know the url.  If you are using as3, you can use:

    var ldr:Loader = new Loader();

    LDR. Load (new URLRequest ("http://www.externalswfdomain.com/path/swfname.swf"));

    addChild (ldr);

    var yourbutton:Sprite = new Sprite();

    addChild (yourbutton);

    {with (yourbutton. Graphics)}

    beginFill(0xffffff,0);

    drawRect (0,0,stage.stageWidth,stage.stageHeight);

    endFill();

    }

    yourbutton.addEventListener (MouseEvent.CLICK, f);

    function f (e: Event) {}

    navigateToURL (new URLRequest ("http://www.yourclickdomain.com"));

    }

  • External swf loading help please!

    Hi, Im trying to load an external swf on even an object in the main swf file, I'm using this code, but I get an error, please help if you can:

    bg.farm.addEventListener (MouseEvent.MOUSE_DOWN, farm_Press);

    var fl_Loader:Loader;

    function farm_Press(evt:MouseEvent):void

    {

    bg.farm.removeEventListener (MouseEvent.MOUSE_OVER, farm_Over);

    bg.farm.removeEventListener (MouseEvent.MOUSE_OUT, farm_OUT);

    bg.farm.removeEventListener (MouseEvent.MOUSE_DOWN, farm_Press);

    removeChild (bg);

    fl_Loader = new Loader();

    fl_Loader.load (new URLRequest ("farmSWF.swf"));

    bg.addChild (fl_Loader);

    fl_Loader.width = Capabilities.screenResolutionX;

    fl_Loader.height = Capabilities.screenResolutionY;

    }

    error-

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    to Project2_fla::MainTimeline/frame1()

    THX pavel

    ferrisID.content, that's how you référenceriez the root of your loaded swf file

    also: you cannot close a swf file loaded, you simply to delete the instance of the stage charger

  • Load external swf from Web site

    Hi guys,.

    I am trying to load an external swf that is downloaded to a folder on my site from a main swf stored locally.  If I use the standard Loader with URLRequest class it doesn't throw any errors, but nothing comes. I need to change some security in my flash file settings to allow this works?

    Thank you very much

    Matt

    the movieContainer class defined in MasterLibrary.swf AND your main swf file?

    If this isn't the case, you can load MasterLibrary into your currentdomain.  If so, you need to reference the application domain the loader:

    public void loaderIOErrorHandler(e:IOErrorEvent):void / / this function is called when the main movie cannot load a local copy of "MasterLibrary.swf".

    {

    loadLibrary = new Loader();

    loaderAppDomain = new ApplicationDomain();  register if required

    loaderContext = new LoaderContext (false, loaderAppDomain);  register if required

    loadLibrary.contentLoaderInfo.addEventListener (Event.COMPLETE, loaded);

    loadLibrary.load (new URLRequest("myDomain/MasterLibrary.swf"), loaderContext);

    }

    public void loaded(e:Event): void

    {

    var:Class=Class(loaderAppDomain.getDefinition("movieContainer)) C;

    var instance: MovieClip = new C();

    addChild (instance)

    }

  • Quick Q re: loading external swf in flash

    There is probably an easy fix that I am right on...

    I am building a Web site where I have several external swf that I load it into my main movie through buttons (using release, container.loadmovie ("movie.swf"))

    There is a clip on the main timeline with several thumbnails, which act as buttons to load each swf. Sovereign wealth funds are loaded within the timeline of the movieclip (not the main timeline). When each swf is loaded, there is a 'return to the thumbnails' button for you back to the page of thumbnails on the main timeline.

    Everything works fine, except that when I click on the button "return to the thumbnail" and it brings back me to the miniature screen... the SWF is still visible as a reason any. The button is just redirecting to an image labeled on the main timeline where the miniature screen slides in... but he loses not the swf file and I can not understand how to make it go away.

    Thanks in advance for any help!

    You will probably need to use a unloadMovie command to get the swf to go away (container.unloadMovie ();).

  • Why I can't load external .swf boxes?

    Hello world...

    I am trying to load an external .swf that contains check boxes. The external .swf has a script in the applications folder on FMS3 server-side.

    When I insert the external .swf locally, it works fine.

    If I load the external .swf remotely with an Apache Web server, the external .swf is loaded but do not appear the boxes...

    Why?

    Please, help me...

    Emiliano.

    Are these components AS2 or AS3? If the latter, I would advise you to place the components in a RSLS (runtime shared library) and active in the external SWF, then reference the RSL.

    -Robert

    --

    Robert Reinhardt

    Creator, videoRx.com

    Author, series Bible Flash and video for Adobe Flash CS4 Professional Studio Techniques

    Adobe Community Expert

    http://blogs.flashsupport.com/Robert

  • [REQUEST] How to remove the object from the list to display and memory that added dynamic

    Hi there everyone,

    I have a question which I hope you guys can help me with, so the question is:


    "How to remove us (sprite object that has an external swf that it is child) display and, above all, of the memory, but we can still use the same variable to add another object (yes another sprite like the one we have removed yet a different content)..,

    I did tried the removeChildAt thing he did remove all the child of the display list, but I still can hear the sound of the video running.

    Here is the code on a small scale of what I do (sorry that I can only give you chunk code loading and adding)

    var SWFList:XMLList; used to contain a list of all the external swf source, atribute and etc.
    var totalSWF:int; the total number of swf external, it must be charged

    var swfLoader:Loader; instance of the loader class to load external swf file

    function loadSWF (): void
    {
    for (var i: Number; i < totalSWF; i ++)

    swfLoader = new Loader();
    swfLoader.contentLoaderInfo.addEventListener (Event.COMPLETE, onSWFLoadComplete);
    swfLoader.load (new URLRequest (SWFList [i], .@source));
    }

    function onSWFLoadComplete(e:Event):void

    {

    this.stage.addChild (e.target.content);

    }

    and also if you can give an example of a good method of dynamic add the object to the stage I would really appreciate cause I suspect mine are bad method.

    Thank you all.

    If you have been publishing for fp 10, just use unloadAndStop().

    I assume you're not publication for fp 10 so you have to use something like:

    function clearScreen (): void
    {
    var mc:MovieClip = MovieClip (swfLoader.content);

    MC.yourflvintheloadedswf.Stop ();

    mc.mcinyourloadedswfthathasalistener.removeEventListener (MouseEvent.CLICK, whateverF);

    etc.

    swfLoader.unload ();
    }

  • Content of external swf showing outside video clip

    untitled.JPG

    This is my final project for a multimedia class, I have a link which is here

    http://mmproduction.blogspot.com/2009/11/final-project-NYTimes-food-issue.html

    Basically I have a movie clip instance (loader_mc).  I have buttons for loading external swf with this code:

    Stop();

    total_photos = 20;
    function get_photo (newnumber) {}
    current_photo = 'do' + newnumber + ".swf";
    loader_mc.loadMovie (current_photo);
    }

    Next button:

    {We (Release)}
    If (n < total_photos) {}
    n ++ ;
    } else {}
    n = 1;
    }
    get_photo (n);
    }

    Previous button:

    {We (Release)}
    If (n > 1) {}
    n-- ;
    } else {}
    n = total_photos;
    }
    get_photo (n);
    }

    I want keys to load the SWF - to give users better ergonomics.  So this is the code I have for each button:

    We (Release)
    {
    loadMovie ("do1.swf", "loader_mc");
    }

    But when I run my main swf - external load swf content outside the area I want to either--because in the external swf content, I put things out of the scene - how to hide the content, I don't want to see?

    I looked at your file (s) and I guess I learned something new... If you select _without as police, it behaves as if you had a dynamic textfield.  I think it's maybe because specifying the _without police ended by saying the file choose a font of the user's machine that satisfies without criteria... so it does not incorporate the police as it normally would.

    The cure for this is to specify a truly named font, such as arial or verdana, or what font you have on your system that you want to use.

    To the extent where where to place the mask, if all these different numbered links in an external swf that had to be hidden as the one you provided, then put the mask in the main file on the layer above the layer of doclip... which means that the mask will be on top of the doclip layer which contains the loader_mc object.  This will be the approach less labour.

    A minor suggestion.  In the swf you load, you must move the layer to the first text field that moves so that it is above the three layers with the photos.  This way the white of the pictures is not visible as they move through the text.

  • Animate the MC in external SWF

    Ok

    using AS3 and 'Tweener', I want to animate a clip of a loaded SWF file.

    However, I would like to do from the main sequence code, no code in external SWF.

    Here is my charger:
    ------------------------------------
    var _swfContainer:Loader = new Loader()
    var _url1:URLRequest = new URLRequest ("about.swf")
    var _url2:URLRequest = new URLRequest ("portfolio.swf")

    var _externalMovie:MovieClip;

    Start loading and add the loader to the scene
    stage.addChild (_swfContainer);
    _swfContainer.contentLoaderInfo.addEventListener (flash.events.Event.COMPLETE, finishedLoading);

    For this, once the swf file is loaded
    function finishedLoading (e: Event)
    {
    _externalMovie = MovieClip (_swfContainer.content);
    }

    function loadAbout(e:Event) {}

    _swfContainer.load (_url1)
    }

    function loadPortfolio(e:MouseEvent) {}

    _swfContainer.load (_url2)
    }
    ------------------------------------------

    Here's the code for Tweener:

    Tweener.addTween (_externalMovie.ip, {x: 244, time: 0.4, delay: 0.3, transition: "easeOutExpo"});

    the '_externalMovie.ip' would be refrence any external SWF that was loaded with the clip 'ip', at least that's what I want

    This is the error I get:
    Error #1009: Cannot access a property or method of a null object reference.
    at main_fla::MainTimeline/frame1()

    Yes, I have my prefrences flash set up to access the Tweener class.

    Sorry, that function "join code" was not working when I created this post

    Well Yes, that was it.

    If I place the code that follows, the tweener code works:
    Kglad, I thank you for all your help!

  • AS3 external swf close self

    Hello

    After looking through the forums online and video tutorials...

    I am always facing errors of loading an external swf into my main swf (full step width).

    In my main.swf... i have several scenes.

    On one of these scenes, I have an external SWF that loads my main.swf step size.

    Which works very well...

    BUT

    I now want to close the external swf on a button (in my external swf) and to return to one of my scenes in my hand. SWF

    I read many forums that talk about dispatchEvent

    I tried these methods and I am still facing errors.

    I want just one button on my external.swf that is farm/unloads/deletes itself... so that the user can continue by HAND. SWF after that they played OUTSIDE. SWF.

    in actionscript 2, it was a breeze.

    in as3, it's a useless pain in my rectum

    Sorry if I've missed a lot

    any help would be appreciated

    jayquery

    Try to change the code of loader main file for more like the following (blue nine):

    var defaultSWF:URLRequest = new URLRequest ("gametestG.swf");

    var loader: Loader = new Loader();
    loader.contentLoaderInfo.addEventListener (Event.COMPLETE, loaderCompleteHandler);
    Loader.Load (defaultSWF);

    function loaderCompleteHandler(evt:Event):void {}
    MovieClip (evt.target.content) .addEventListener ("closeChild", onChildClose);
    addChild (loader);
    }

    function onChildClose(event:Event):void {}
    loader.unloadAndStop ();
    removeChild (loader);
    }

  • Pause/Play for external SWF

    Can someone help me witht this? I'm going crazy trying to understand because none does not work. I am trying to create a play/pause button that will make a break and play on the main timeline (easy), but also an external SWF that is loaded with the class Loader. Here is my code:

    var myLoader:Loader = new Loader();Create a new instance of the Loader class

    var url: URLRequest = new URLRequest ("MYCONTENT.swf");

    myLoader.load (url);load the SWF file

    myLoader.x = 134;

    myLoader.y = 148;

    addChild (myLoader);

    In the main scenario, I have a MovieClip that is the Pause/Play button. He alternates between the two. How to control the external SWF as well?

    Section 1:

    Stop();

    pauseBtn.addEventListener (MouseEvent.CLICK, pauseMovie);

    function pauseMovie(e:Event): void {}

    gotoAndStop (2);

    MovieClip (root) .stop ();

    MovieClip (root).myLoader.content.stop ();  ///??????????

    }

    Section 2:

    playBtn.addEventListener (MouseEvent.CLICK, regarderMovie);

    function playMovie(e:Event): void {}

    gotoAndStop (1);

    MovieClip (root) .play ();

    MovieClip (root).myLoader.content.play ();  ///????????????

    }

    Try:

    var myLoader:Loader = new Loader(); Create a new instance of the Loader class

    var url: URLRequest = new URLRequest ("MYCONTENT.swf");

    myLoader.load (url); load the SWF file

    myLoader.x = 134;

    myLoader.y = 148;

    addChild (myLoader);

    In the main scenario, I have a MovieClip that is the Pause/Play button. He alternates between the two. How to control the external SWF as well?

    Section 1:

    Stop();

    pauseBtn.addEventListener (MouseEvent.CLICK, pauseMovie);

    function pauseMovie(e:Event): void {}

    gotoAndStop (2);

    MovieClip (root) .stop ();

    MovieClip (MovieClip (root).myLoader.content) .stop ();  ///??????????

    }

    Section 2:

    playBtn.addEventListener (MouseEvent.CLICK, regarderMovie);

    function playMovie(e:Event): void {}

    gotoAndStop (1);

    MovieClip (root) .play ();

    MovieClip (MovieClip (root).myLoader.content) .play ();  ///????????????

    }

  • Control external swf timeline

    Hey guys

    I was wondering how to control the timeline of an external swf that is loaded into the root of your main timeline from within clips embedded in your main timeline?

    I can control it successfully once he is responsible for the function which assigns the external swf a var MovieClip, but I want to be driven for more deeply in my main swf.

    1. I loaded an external swf into the root of my main swf.

    2. after loading, I assign the external swf file a var MovieClip and then set up a button to control the timeline of the external swf file:

    function dataOnLoad(evt:Event): void {}

    var myClip:MovieClip = evt.target.content;

    function updateSwf(evt:MouseEvent): void {}

    myClip.swf_MC.gotoAndPlay (2);

    }

    update_but.addEventListener (MouseEvent.CLICK, updateMenu);

    }

    I want to do is now, instead of the button where it is, I like it to reside in the moiveclip, I called editor_MC, which is on the timeline which is the code of function above.  How can I call updateSwf(evt:MouseEvent) to editor_MC?

    Cheers for your help guys.

    Shaun

    do not take local myClip to your function.  (and never nested named functions):

    var myClip:MovieClip;

    var loader: Loader = new Loader();
    addChild (loader);

    var newSWFRequest:URLRequest = new URLRequest (loadSwf.text);
    Loader.Load (newSWFRequest);

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

    function dataOnLoad(evt:Event): void {}

    myClip = MovieClip (evt.target.content);

    update_but.addEventListener (MouseEvent.CLICK, updateMenu);

    }

    function updateSwf(evt:MouseEvent): void {}

    myClip.swf_MC.gotoAndPlay (2);

    }

  • How to get a SWF that is responsible for controlling the parent timeline?

    I have a SWF that loads an external swf. I want the external swf (that has been loaded only), interact with the timeline of the swf file that just load it. I tried MovieClip (root). or MovieClip (parent). but they give me errors. How can I use as3 in the external swf so that it interacts correctly with the parent?

    the main timeline in the swf file that is loaded, you can reference the main timeline in the swf loading using:

    MovieClip (parent.parent)

Maybe you are looking for

  • Web site will not disappear after closing the tab AND restart Firefox.

    I went to a website to watch a video, and when I had finished I closed the tab on what the site was. When I had finished on my computer, I closed Firefox. The reopening of Firefox later he restored the page. I don't know why it does this, and I can't

  • How to turn off the menu of the camera on Satellite A205?

    About a year and a half ago, I bought a laptop Satellite A205-S462. It came with a camera that I never had a use for. I managed to turn off the camera, but the context menu pop still annoyingly when my mouse goes to the left of the screen.Can someone

  • Operations of independent channels

    Hey all,. Need help optimize the attached vi... Suggest me a better idea?

  • T500 to T540P migration

    I previously did a T500 OS system image and everything. The T500 is on it is the last step. I got a T540P as a replacement but I want to migrate the T500 Image system restore on my T540P. I know it's doable, because I did it BUT the problem is, I thi

  • Error code; 0xC004F050

    Unactivated product key.  I had this bridge for over 2 years with no problem.  I've updated my AntiVirus MicroTrend, one couple of days, and that's when the problem seem to start.  I don't know if she has nothing to do with it or not.  I've been runn