load an external xml in an external .swf responsible

Hello...

I have a problem of hail (more than 100 hours of thinkwork so far!), that I can't solve:

I want to load an external swf loaded with a dynamically loaded xml (load from my file config.xml) wire.

< bgColor = "000000" bgHover menuItem = "Fred" fontColor = "cccccc" fontHover = "ffffff" >
Home < title > < /title >
< btntitle > <! [CDATA [home]] > < / btntitle >
external SWF < linktype > < / linktype >
./content/SWF/home.swf < url1 > < / url1 > < - loads the external swf in the main swf - >
./content/XML/home.XML < url2 > < / url2 > < loads the external xml file thet is necessary in the external swf loaded in the line of top - >

< / menuItem >

How can I get the external xml in the external swf file as a variable for the ActionScript in the loaded swf external (so I just put the path to the script in my external swf...).

Can someone help me out here because I'm really stuck for now...

Thanks in advance!

Welcome William

the path to the xml file is relative to the html file that includes your main swf.  No matter where the swf file loaded (except for the path that you will use in your loadMovie() method etc.).

Tags: Adobe Animate

Similar Questions

  • load an external swf on a mc that is on the screen

    This seems like a basic question, but if I have a swf file in the same directory as the fla and wants her to be on a mc, is there an easy way? so I make a movieclip on the screen and you want it to load. someone at - it a small example?

    Use the loader class to load an external swf.

    var loader: Loader = new Loader();

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

    addChild (loader);  Adds the charger to the current timeline

    If you want to add the loader to a movieclip, the method addChild to this movieclip, for example:

    yourmovieclip.addChild (loader);

  • Load an external SWF file without overwriting my container SWF (AS2) file

    Hello world

    I want to load an external SWF with AS2, but file without overwriting my container file. How can I achieve this? What is the correct code?

    Here is the code I use :

    loadMovieNum ("external.swf", 0);

    countdown = function() {}

    trace ("OK");

    }

    countdownIt = setInterval (countdown, 1000);


    It works well, but as I said, it overwrites my container SWF file. If I load into level 1, my container file works but not the one I try to load... .



    Can someone help me with this, please?

    Try to use the loadMovie method... meaning container.loadMovie.  See below for an explanation: Load external in another SWF SWF

    If the loaded file does not work when you load it, it is probably because you have references to _root in there who do not find the expected _root.  You must set the file loaded _lockroot property to be true.

  • Problem with loading an external swf of in an external swf...

    OK, everything was going well on a Web site project, I worked, until yesterday. I will try to explain the whole scenario first, and I'll put the code here too so anyone can try to understand what the problem is. Here is a breakdown of the site:

    1) there a MAIN SWF file that plays an intro and then stops on the last image with the Navigation buttons 'hand'.

    2) in the root folder where the MAIN SWF resides, there is another folder called "sovereign wealth funds", which contains six main external navigation pages, but also another folder called "galleries" which contains additional external SWFs for six pages in the gallery.

    3) on one of the layers of the MAIN SWF, there is a clip called 'mySWFLoadingClip' that the buttons of Navigation of the 'hand' loading and unload pages external to swf. It all works perfectly. The beginning of the problem to the next step. This is the code I used for the buttons of navigation on the MAIN SWF scenario:

    var Xpos:Number = 0.0;
    var Ypos:Number = 0.0;
    var swf:MovieClip;
    var loader: Loader = new Loader();

    var defaultSWF:URLRequest = new URLRequest("swfs/home_page_swf.swf");

    Loader.Load (defaultSWF);
    Loader.x = Xpos;
    Loader.y = Ypos;
    this.mySWFLoadingClip.addChild (loader);
    ////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////

    Function universal BTNS
    function btnClick(event:MouseEvent):void {}

    this.mySWFLoadingClip.removeChild (loader);
    var newSWFRequest:URLRequest = new URLRequest ("SWFs /" + event.target.name + ".swf");
    Loader.Load (newSWFRequest);
    Loader.x = Xpos;
    Loader.y = Ypos;
    this.mySWFLoadingClip.addChild (loader);
    }
    Listeners of BTN
    home_page_swf.addEventListener (MouseEvent.CLICK, btnClick);
    portfolio_page_swf.addEventListener (MouseEvent.CLICK, btnClick);
    services_page_swf.addEventListener (MouseEvent.CLICK, btnClick);
    about_page_swf.addEventListener (MouseEvent.CLICK, btnClick);
    team_page_swf.addEventListener (MouseEvent.CLICK, btnClick);
    contact_page_swf.addEventListener (MouseEvent.CLICK, btnClick);


    4) one of the external navigation SWF pages is called "portfolio_page_swf" and gets loaded into the moveclip of 'mySWFLoadingClip' on the MAIN SWF. This is where the problem begins. The "portfolio_page_swf" has six buttons facing an additional external swf in the file galleries. Now when I open the file "portfolio_page_swf" to test if the buttons work, they work perfect. When I click the buttons, the external swf gallery files appear as they should. But the problem is that when I open the "MAIN SWF" file to test the site, I can click on the main Navigation buttons and they work. I click the portfolio button on the time line of Hand SWF and place of 'portfolio_page_swf' on the stage as it should, but when I click the buttons located in the 'portfolio_page_swf' galleries are not displayed. The page "portfolio_page_swf" buttons work only if I open the file 'portfolio_page_swf' directly. The following code is used in the "portfolio_page_swf":

    var Xpos:Number = 0.0;
    var Ypos:Number = 0.0;
    var swf:MovieClip;
    var loader: Loader = new Loader();

    var defaultSWF:URLRequest = new URLRequest("galleries/gallery_print_swf.swf");

    Loader.Load (defaultSWF);
    Loader.x = Xpos;
    Loader.y = Ypos;
    this.mySWFLoadingClipGALLERY.addChild (loader);
    ////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////

    Function universal BTNS
    function btnClick(event:MouseEvent):void {}

    this.mySWFLoadingClipGALLERY.removeChild (loader);
    var newSWFRequest:URLRequest = new URLRequest ("galleries /" + event.target.name + ".swf");
    Loader.Load (newSWFRequest);
    Loader.x = Xpos;
    Loader.y = Ypos;
    this.mySWFLoadingClipGALLERY.addChild (loader);
    }
    Listeners of BTN
    gallery_print_swf.addEventListener (MouseEvent.CLICK, btnClick);
    gallery_packaging_swf.addEventListener (MouseEvent.CLICK, btnClick);
    gallery_web_swf.addEventListener (MouseEvent.CLICK, btnClick);
    gallery_video_swf.addEventListener (MouseEvent.CLICK, btnClick);
    gallery_others_swf.addEventListener (MouseEvent.CLICK, btnClick);
    gallery_logos_swf.addEventListener (MouseEvent.CLICK, btnClick);

    If anyone can help understand me this I would really appreciate. This is a very important project and the deadline is coming up very soon. Please help me understand how to load an external SWF on the main timeline and then charge an additional external swf within the first external swf. I'm puzzled.

    If I'm following the structure you describe, it's probably a problem of targeting.  If you load a swf into another swf I think the scenario is the same that if you load a swf in a web page...  The charging base is the document down the chain, which is your main swf if you test Flash (otherwise it would be so stable web page in a web page).  So when your portfolio is responsible in the hand, it's like living in the folder of the hand, so your swf portfolio should probably include sovereign wealth funds in targeting... as in...

    var defaultSWF:URLRequest = new URLRequest("swfs/galleries/gallery_print_swf.swf");

  • Load an external swf as a different size?

    Hello - it seems that it would be quite easy, but I couldn't understand the research in the Flash help documentation.

    I am using Flash CS3 and AS2.0.  I use the loadMovie function to load an external swf into an empty movieclip.  The problem is that the external swf file is bigger that the image I am load, so I would load it with specific width/height settings (essentially to load it in and resize it down).

    What would be the command loadMovie to do it with?

    Thank you!!!

    You will have to wait for the movie to load before you can change its size.  To know that the film is loaded, you want to override the method MovieClipLoader.loadClip, loadMovie.  The loadClip method supports having a similar earpiece so that you can know when the file is loaded and ready to use.  If you are looking for the MovieClipLoader.addListener method in the help documentation, there is an example that should help you through most of it.  He uses an onLoadInit event listener which is what you want to use because you have to wait as the SWF to be loaded and ready for use before trying to influence it.

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

  • Need help to load an external SWF

    I'm not very proficient in Flash, so any help will be greatly appreciated. I am trying to load an external SWF with the following code:

    T1_Bttn_BloodCar.onRelease = function() {}

    (" t1_images_mc.loadMovie("images/T1_Gallery/BloodCar_SWF/T1_BloodCar.swf ");

    t1_images_mc._alpha = 0;

    It loads the SWF file, but it is not playing correctly when I test it. Here's how the loaded movie is supposed to look like:

    http://www.theroboteye.com/T1_BloodCar.html

    But instead, he plays without the transitions, like this:

    http://www.theroboteye.com/TRE2009b.html

    I tried to figure this out for a few days and have tried to add "this ._lockroot = true;" to the SWF I am trying to load, but I can't play properly. Can someone tell me what I am doing wrong? Thanks in advance.

    Try using MovieClipLoader (loadClip method) class rather than the loadMovie method.  In this way, you can have a listener who expects the movie to be loaded and then pull it in-game, by assigning actions and properties after the fact.

  • Load an external SWF since an external SWF

    Hello

    I'm kinda caught between a rock and a hard spot on a flash site project. Here's the situation:

    I created a parent movie (that load all external SWF inside) that has built-in navigation menu. However, my client wants to place me some more inside the external swf links that lead to other pages (external SWF) on the site. Is this possible? I was hoping there is a way to tell a button in an external SWF to make the parent film from an external SWF.

    ANY help is appreciated. Thank you.

    Another question: it does not use the _parent script?

    Elijah

    If you want, for example, a button in welcome.swf to load a SWF into support, then welcome.swf will be unloaded. is that what you want? If so, in welcome.swf you can use:

  • How can I load an external SWF into a clip that is inside another video clip?

    Hello.

    I create my first flash (actionscript 3.0) Web site, but I'm stuck with a visual effect, I want to create.
    I have a window on my website called contentWindow. Whenever you click on a button, this window is supposed to leave the scene, loading the requested content and back on the scene.
    The sliding window is a clip with 83 frames, 21 to enter the stadium, 21 to leave the scene once again, 20 for anything (it's just to simulate the load time) and 21 to the back on the scene.

    Now, my goal is, when the user clicks a navigation button, the window leaves the scene, loading an external SWF with the content and then returned to the scene.

    I have the clip of 'window' with an instance name of "contentWindow". Inside there is an another film clip with an instance name of "contentLoader. The content that the user has requested must appear inside the 'contentLoader.

    Now, when the contentWindow leaves the scene, I get this error message:

    Quote:
    TypeError: Error #1009: cannot access a property or method of a null object reference.
    at rwd_fla::MainTimeline/trigger()
  • 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.

  • Loading an external SWF in Actionscript 2

    I'm creating an animation in Flash CS4 Actionscript 2.0 / Flash Player 7

    At the moment I have a Manager (video Clip) called myHolder which is used to play other swf files in a main swf file, when it is called by a button

    Within a button that loads the SWF in the main scenario - for example

    on (press) { loadMovie("BulletTrainDRAFT.swf", myHolder); }

    It works very well with bring the other swf files in the timeline of the main swf file, but when I put them a swf file that has video controls for a video it contains, they are not in Manager when played, but they do not work when the swf file is playing in its own window of external flash drive (the video is (Clip) on his own script in its fla design)

    Video buttons - ActionScript 2.0

    btnStop.onPress = function()

    {  _root.vid.stop();  }

    btnPlay.onPress = function()

    {  _root.vid.play();  } 

    btn_fastforward.onPress = function()

    {  _root.vid.nextFrame();  } 

    btn_Rewind.onPress = function()

    {  _root.vid.prevFrame();  }

    I tried ActionScript 3.0 code so

    Pausebtn.addEventListener(MouseEvent.CLICK,pauseHandler);

    Stopbtn.addEventListener(MouseEvent.CLICK, stopHandler);

    Playbtn.addEventListener(MouseEvent.CLICK,playHandler); 


    function stopHandler(event:MouseEvent):void

    { // Pause the stream and move the playhead back to // the beginning of the stream. video.gotoAndStop(1); }

    function playHandler(event:MouseEvent):void

    { // Pause the stream and move the playhead back to // the beginning of the stream. video.play(); }

    function pauseHandler(event:MouseEvent):void

    { // Pause the stream and move the playhead back to // the beginning of the stream. video.stop(); }

    Problem I have I think, is that an external swf movie load on the current timeline as a child and don't dump the chronology leading to the non-functional actionscript code, but I can't solve this problem.

    If the swf containing the video is an as2 swf, add:

    This ._lockroot = true

    It is the main timeline.

  • How can I load an external .swf into my step by pressing a button?

    Hello world...

    I have to add an external swf in a specific position in my scene by pushing a button.

    Comeon can help me?

    Thank you.

    using as3, assuming you have a button named "myButton":

    var myLoader:Loader = new Loader(); something to load the swf file

    myButton.addEventListener (MouseEvent.CLICK, loadSWF); Earphone for your button click

    function loadSWF(event:MouseEvent):void {}

    listener for when the charge is complete

    myLoader.contentLoaderInfo.addEventListener (Event.COMPLETE, addSWF);

    load the SWF - using your url of course

    myLoader.load (new URLRequest ("yourSWFsURL.swf"));

    }

    function addSWF(event:Event):void {}

    var mySwf = myLoader.content; the thing charge charger

    mySwf.x = 100; anywhere in x

    mySwf.y = 100; anywhere in there

    addChild (mySwf); Add it to the stage

    }

    HTH,

    -Ted

  • Loading an external swf

    I am trying to edit the FLA of the developer who disappears when the link to an external SWF is somehow broken. The button that triggers the SWF has the next action associated with it:

    (release)
    {
    gotoAndPlay ("collection")
    }

    There is no sequence named 'collection', only an external swf called 'spring.swf '. When I change the actionscript code to refer to "spring.swf" I get nothing.

    There is a layer of script which has a unique setting with a reference to spring.swf. His action reads as follows:

    Stop()
    loadVariables("flash/spring.swf",placeholder).

    This action occurs on the same chassis as an instance of the button.

    I am a novice to say the least and I am totally baffled. Thanks for any advice.

    The mention 'collection' is an image tag, not a scene, if look back through the timeline (or the use of the movie in the Actionscript Panel Explorer/script) to find a framework with this name. The button has nothing to do with the external SWF file loading, it's the handle in the second bit of code you have there... but I have to say I've never seen loadVariables used to pull in a SWF file, which should probably be loadMovie instead.

    Hope that helps!

  • External SWF responsible for bringing forward

    Hello

    I am currently implementing to create a Web site using the approach platform scrolling game side. As the player/actor (a character who moves according to keyboard events) must always be at the top layer, I have difficulties to get my swf loaded on top of the drive. I am currently using Flash (as3) cs6.

    Basically, in my big scene, there are 3 layers. 1 for actionscript, the HAS a player and finally for the background.

    Player of layer contains mc and mc background player.

    Background MC contains layers of visual and collisions.

    Everything that has to do with visual, I have to put in the Visual Layer.

    In the Visual Layer, I have backgroundcontainer mc

    Then, I put the button in the mc backgroundcontainer to call the external swf, loading external swf file appears in the container.

    (I use loading/unloading of the snippet of code to call the external swf file)

    I want the external swf to appear at the top of the drive.

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

    for (var fl_ChildIndex_2:int = 0;

    fl_ChildIndex_2 < this.numChildren;

    fl_ChildIndex_2 ++)

    {

    this.getChildAt (fl_ChildIndex_2) .addEventListener (MouseEvent.CLICK, fl_ClickToBringToFront_2);

    }

    function fl_ClickToBringToFront_2(event:MouseEvent):void

    {

    this.addChild (event.currentTarget as DisplayObject);

    }

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

    Any help would be greatly appreciated

    If you want an object to move at the top of all the others, you can use addChild (thatobject), where thatobject corresponds to the element you want to move to the top of what anyone else.  I do not know what tent objects to affect your loop, but it seems to be changing the index of all of the child objects, rather than a single one.

  • How to correctly load an external swf file in iosAir app? I get a blank screen.

    So this code works flawlesly we Air for Android, it works very well when I test the movie in Flash, but once I have the export, I get a blank screen. I've done a swf with a place withotu any code, and flash is still unable to load. It's weird cause everything works well when using the shell to the debug option, but when I goes to the white screen of standard debugging appears on my ipad. I read somewhere that it caused by the way flash saves the link to external files. So after the file is compiled Flash is unable to find the files added prefiously, which results in a blank screen. There is clearly something wrong with the way in which the process of compiling the application.

    Tried this:

    var Xpos:Number = 0;

    var Ypos:Number = 0;

    var loader: Loader = new Loader();

    var link: URLRequest = new URLRequest ("Untitled - 1.swf");

    Loader.Load (Link);

    addChild (loader);

    And this:

    var ldr:Loader = new Loader();

    LDR. Load (new URLRequest ("Untitled - 1.swf"));

    ldr.contentLoaderInfo.addEventListener (Event.COMPLETE, loaded, false, 0, true);

    function loaded(event:Event):void {}

    addChild (event.target.content);

    }

    But nothing works. I still get a blank screen. Is it possible to add the SWF manually in the file descriptor cause flash most likely he mess up? I don't really want to use via the command line.

    Read this article, especially the little loadercontext and currentdomain:

    http://blogs.Adobe.com/airodynamics/2012/11/09/packaging-and-loading-multiple-SWFs-in-air-apps on ios.

Maybe you are looking for