How to load external swf file and unload the swf file parent?

I have a question. Let's say I have file1.swf, file2.swf and file3.swf, how can I link this 3 files together.

Let's assume that file1.swf is the main content file, but as I load file2.swf, I want the file1.swf get replaced by file2.swf. How could unload file1.swf at that time, so that my file2.swf will become the main content file?

and even once, when my current post file2.swf and I want it get replaced by file3.swf tinkle of a button. so that i can unload the file2.swf and let them file3.swf become the main content file...
Anyone have ideas on this?
Thank you..

If you're publishing to fp 10 + use:

var loader: Loader = new Loader();

var urlR:URLRequest = new URLRequest();

addChild (loader);

Btn1.addEventListener (MouseEvent.Click, f);

btn2.addEventListener (MouseEvent.Click, f);

function f(e:Event):void {}

{if (Loader.Content)}

loader.unloadAndStop ();

}

{if(e.currentTarget==btn1)}

urlR.url = "file2.swf";

} else {}

urlR.url = "file3.swf";

}

Loader.Load (urlR);

}

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

Tags: Adobe Animate

Similar Questions

  • How to load external swf files into the AIR

    I try this code its working at the computer, but when I publish this .apk or .ipa file, my external swf file does not open

    (I included my external file as well)

    places_btn.addEventListener (MouseEvent.MOUSE_DOWN, newvid);

    function newvid(event:MouseEvent) {}

    trace ("you clicked me");

    var loadit = new Loader();

    addChild (loadit);

    loadit. Load (new URLRequest ("scene02.swf"));

    }

    01.jpg

    Add this in your newid function:

    You forgot to put the beginning of your original function:

    var loadit = new Loader();

    addChild (loadit);

    var _lc:LoaderContext = new LoaderContext (false null, ApplicationDomain.currentDomain),

    loadit. Load (new URLRequest ("scene02.swf"), _lc);

  • How to load external images and animate it after it is loaded?

    I know how to load external images using xml, but the problem is that if I have a lot of images to load then animate after it is loaded. I know theres a work around to this problem but still I have not understand.

    Thanks for help.

    You will need to use the MovieClipLoader class.  It supports have a headset which allows you to determine when the image has loaded so that you can act on it.

    If you are looking for the MovieClipLoader.addEventListener methoid (), there is an example that will be useful to see how to configure things (it's not your scenario, but a good reference).

  • Can we load and unload the files in the run time?

    Can we load and unload the files in the run time?

    For example, there are four files named 'test1.h & test1.c' and another series 'test2.h & test2.c' (I have attached as an attachment to this post).

    test1.h contains the code:

    int variable; variable declared as integer

    test1.c contains the code:

    variable = 1; variable a value assigned

    test1.h contains the code:

    char * variable. variable declared as string

    test1.c contains the code:

    variable = "EXAMPLE"; a string that is assigned to variable

    So here, in this case can I dynamically load / unload first & second group files so that the same variable "variable" name can be used as an integer and string? And if so, how to do?

    Hi pa1majeti,

    You cannot simply consider that some code is loaded into memory or not: all code in a compiled application is permanently in memory unless you divide your application into DLLs that you dynamically load if necessary and remove if is no longer necessary.

    But as I understand from your description, you're better given the amount of memory occupied by the data (i.e. the contents of the variables) rather than the code. If this is the case, your only option is to allocate memory for variables dynamically and free it after it has been used. Now, even if this option is useful if you are using large networks of data, there is little or no effect on the unique variables.

    A final Council, given the huge memory installed on modern computers, are you sure you really need that extra work? I mean, the dynamic allocation of memory involves some additional precautions in programming: check the errors on each function malloc or calloc, check that the pointer is valid before each use, freeing pointers before reassignment in order to avoid memory leaks and so forth, so a balance must always be sought between the memory and the difficulty in programming.

  • Problem with loading external swf files

    Hello

    I am currently working on a project which is an interactive and dynamic elemtry school presentation to the Denmark. I finished my project and it works perfectly, but only locally on my computer.

    The final draft should be implemented on the site and public work. I tried to implement the project on the site and unfortunately, it does not work as expected.

    When all the files where transferred to the ftp server, only a single files are responding and appear correctly.

    Interactivity of the project is based on a structure of Action script, which is based on the smooth transition between swf files (load another swf file after the action is triggered by clicking on a button) do any work.

    After days of trying to figure out the solution, I'm totally lost. One thing is to publish the project so that all action script will work and answer between swf files, and the other thing is to make it user-friendly for the Android and apple products.

    The presentation is quite heavy because of its loading external swf content files, which are images and movies.

    I really hope you can help me with my problem. I will gladly share the files and codes if it would help solve the problem.

    Best regards

    Agata

    It could be a problem of location of file from loading.  When you place a swf file in an HTML base for targeting anything that the SWF load becomes the folder of the html page.  You may need to adjust the target so that the target of swf files, load it as if it were in the same folder as the html page.

  • Loading external .swf integrated

    OK, here's a doozy (or so I think).  I was invited to take a video on a website (.swf file) and burn it to a CD to the internal office.  Unfortunately, the file .swf on the website is highly integrated, and I tried all possible means to get this file out of the site.  I tried saving the file from my computer and load it with a charger in Flash.  The only thing that works is if I take a .swf embed code and place it on a different Web site, which is not what I am trying to accomplish.  So, my question: is it possible to load an external severely embedded .swf in a Flash movie?  I understand how to load a .swf which may not seriously addressed, but I'm stumped on this one.  I understand that companies really integrate their content so that people can not rip off it, that ' a given.  So there still no way around this?

    I used the CS4 component and the Component Inspector to load the .swf, so I do not have any script to post.  Thank you!

    Im not sure what you mean by "severely embedded?

    You say there's a player out there and you try to download the movie to the player?

  • Load external wav files

    I'm currently import mp3 files using the loadSound feature. Problem is, because of some problems of mp3 encoding that I can't use this format due to problems of loop, so I turn to .wav files that work very well. The thing is, if I try to import wav files using the loadSound function it does not work... do not play the wavs.

    Is there a way I can load external wav files in flash?

    You can load a wav, but you can't seem to play by using loadSound().

  • How to load a multiple column table in the coherence of caches?

    How to load a multiple column table in the coherence of caches?
    I want to load a multi-column (about 20 columns) table in cache coherence. How to change the following code (spatially how to change the SQL SELECT statement)?
    Is the following select statement enough: Select the key, the value of EMPLOYEES ?
    public static void bulkLoad(NamedCache cache, Connection conn)
        {
        Statement s;
        ResultSet rs;
        
        try
            {
            s = conn.createStatement();
            rs = s.executeQuery("select key, value from table");
            while (rs.next())
                {
                Integer key   = new Integer(rs.getInt(1));
                String  value = rs.getString(2);
                cache.put(key, value);
                }
            ...
            }
        catch (SQLException e)
            {...}
        }

    First of all, you need a class to hold your 20 fields:

    public class Data {
    
        private String field1;
        private String field2;
        private String field3;
        private String field4;
        private String field5;
        private String field6;
        private String field7;
        private String field8;
        private String field9;
        private String field10;
        private String field11;
        private String field12;
        private String field13;
        private String field14;
        private String field15;
        private String field16;
        private String field17;
        private String field18;
        private String field19;
        private String field20;
    
        public Data() {
        }
    
        public String getField1() {
            return field1;
        }
    
        public void setField1(String field1) {
            this.field1 = field1;
        }
    
        public String getField2() {
            return field2;
        }
    
        public void setField2(String field2) {
            this.field2 = field2;
        }
    
        public String getField3() {
            return field3;
        }
    
        public void setField3(String field3) {
            this.field3 = field3;
        }
    
        public String getField4() {
            return field4;
        }
    
        public void setField4(String field4) {
            this.field4 = field4;
        }
    
        public String getField5() {
            return field5;
        }
    
        public void setField5(String field5) {
            this.field5 = field5;
        }
    
        public String getField6() {
            return field6;
        }
    
        public void setField6(String field6) {
            this.field6 = field6;
        }
    
        public String getField7() {
            return field7;
        }
    
        public void setField7(String field7) {
            this.field7 = field7;
        }
    
        public String getField8() {
            return field8;
        }
    
        public void setField8(String field8) {
            this.field8 = field8;
        }
    
        public String getField9() {
            return field9;
        }
    
        public void setField9(String field9) {
            this.field9 = field9;
        }
    
        public String getField10() {
            return field10;
        }
    
        public void setField10(String field10) {
            this.field10 = field10;
        }
    
        public String getField11() {
            return field11;
        }
    
        public void setField11(String field11) {
            this.field11 = field11;
        }
    
        public String getField12() {
            return field12;
        }
    
        public void setField12(String field12) {
            this.field12 = field12;
        }
    
        public String getField13() {
            return field13;
        }
    
        public void setField13(String field13) {
            this.field13 = field13;
        }
    
        public String getField14() {
            return field14;
        }
    
        public void setField14(String field14) {
            this.field14 = field14;
        }
    
        public String getField15() {
            return field15;
        }
    
        public void setField15(String field15) {
            this.field15 = field15;
        }
    
        public String getField16() {
            return field16;
        }
    
        public void setField16(String field16) {
            this.field16 = field16;
        }
    
        public String getField17() {
            return field17;
        }
    
        public void setField17(String field17) {
            this.field17 = field17;
        }
    
        public String getField18() {
            return field18;
        }
    
        public void setField18(String field18) {
            this.field18 = field18;
        }
    
        public String getField19() {
            return field19;
        }
    
        public void setField19(String field19) {
            this.field19 = field19;
        }
    
        public String getField20() {
            return field20;
        }
    
        public void setField20(String field20) {
            this.field20 = field20;
        }
    }
    

    Then you can use it to store data in you original code

    public static void bulkLoad(NamedCache cache, Connection conn)
        {
        Statement s;
        ResultSet rs;
    
        try
            {
            s = conn.createStatement();
            String sql = "select key, value, value2, " +
                    "value3, value4, value5, value6, " +
                    "value7, value8, value9, value10 " +
                    "value11, value12, value13, value14, " +
                    "value15, value16, value17, value18, " +
                    "value19, value120 from table";
    
            rs = s.executeQuery(sql);
            while (rs.next())
                {
                Integer key   = new Integer(rs.getInt(1));
                Data data = new Data();
                data.setField1(rs.getString(2));
                data.setField2(rs.getString(3));
                data.setField3(rs.getString(4));
                data.setField4(rs.getString(5));
                data.setField5(rs.getString(6));
                data.setField6(rs.getString(7));
                data.setField7(rs.getString(8));
                data.setField8(rs.getString(9));
                data.setField9(rs.getString(10));
                data.setField10(rs.getString(11));
                data.setField11(rs.getString(12));
                data.setField12(rs.getString(13));
                data.setField13(rs.getString(14));
                data.setField14(rs.getString(15));
                data.setField15(rs.getString(16));
                data.setField16(rs.getString(17));
                data.setField17(rs.getString(18));
                data.setField18(rs.getString(19));
                data.setField19(rs.getString(20));
                data.setField20(rs.getString(21));
                cache.put(key, data);
                }
            ...
            }
        catch (SQLException e)
            {...}
        }    
    

    Of course your data object would need the appropriate field names and you will have no channels for all types. It must also implement equals and hashCode and ideally PortableObject.

    JK

  • My 4th generation Apple TV installed an update and asked my password which he refused to accept time and time again. How to go beyond this screen and reset the unit?

    My 4th generation Apple TV installed an update and asked my password which he refused to accept time and time again. How to go beyond this screen and reset the unit?

    If she needs your Apple ID password and you have enabled 2-factor authentication, you might have to temporarily disable the connection to complete.

    Also, you need an internet connection to perform this step here.

    If your problem is not of the above, please describe more completely. Furthermore, to give specific messages on the screen.

  • How can I get my contacts and all the other stuff I had on the old email?

    Original title: I changed my email because they said my old email was invalid... How can I get my contacts and all the other stuff I had on the old email? They said, it has been deleted

    If my email isn't valid how I used it?

    Hello

    1. which email account you are referring to?

    2. What is the version of Windows installed on the computer? For example, Windows 7, Vista

    Please answer these questions and provide additional information so that we can better guide you.

  • How to install volume control program and retrieve the sound icon in the start bar

    How to install volume control program and retrieve the sound icon in the start bar

    He runs this Microsoft Fixit usually solves http://support.microsoft.com/kb/319095

  • HI, how can I scan a picture and only the witout the rest. On a HP Officejet Pro 8600 Plus?

    HI, how can I scan a picture and only the witout the rest. On a HP Officejet Pro 8600 Plus?

    When I scan I got my photo and all white for the rest of the screen

    It has no function of machine harvest in the 8600 software. To get the exact size, you will need to manually set the size for the scans that you do. You can find the setting by clicking on the blue link to advanced settings in the first scan window. Will take you to a place that will allow you to change the size of the scanning area. Hope that helps.

  • How can I uninstall adobe CD and reinstall the original adobe acrobat reader software

    How can I uninstall adobe CD and reinstall the original adobe acrobat reader software

    Sign out of your account... Uninstall... to run vacuuming...

    -non-Cloud programs, to disable the service before uninstalling

    -http://helpx.adobe.com/creative-cloud/help/install-apps.html (and uninstall)

    -using the vacuuming after uninstalling and before reinstalling is often necessary

    -https://helpx.adobe.com/creative-suite/kb/cs5-cleaner-tool-installation-problems.html

    Download and install the old version by entering your serial number when required

    kglad links in response to #1 here can help https://forums.adobe.com/thread/2017859

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

  • Load and unload the swf file

    I am currently using AS2.

    I create a button instance named 'myBtn' and I want it to load the external swf "test2.swf" call all to unload the current swf file named "test1.swf" when you press on / release.

    that fact is I put the following code under mybtn:

    We (Press)

    {

    unloadMovie ("test1.swf");

    loadMovie ("test2.swf", 1);

    }

    the result was that the "test2.swf" was loaded successfully, but the "test1.swf" fail to unload.

    Any help is welcome

    AS2... Scope is your problem. When you are inside the function for delivery you tell the button you used to unload test1.swf of inside of this button (which it is not located in).

    You are probably using the root timeline, so I'll take a bet that it works:

    (press)

    {

    _root.loadMovie ("test2.swf");

    }

    If you want to follow the progress of loading between them, it is a bit more complex.

Maybe you are looking for