Loading SWF files and allowing them to close

Hello. I had success with the loading of a swf on the timeline (go button) and have it close if clicked. However, I would like to have a 'Close' button on the loaded SWF (not only the entire swf file). For now, it's just, shut up and go back to the main timeline if clicked. The code I have so far:

var myLoader:Loader = new Loader ();
page1_mc.addEventListener (MouseEvent.CLICK, page1content);
function page1content(myevent:MouseEvent):void {}
var myURL:URLRequest = new URLRequest ("page1.swf");
myLoader.load (myURL);
addChild (myLoader);
}

myLoader.addEventListener (MouseEvent.CLICK, unloadcontent);
function unloadcontent(myevent:MouseEvent):void {}
removeChild (myLoader);
page1_mc.gotoAndPlay (1);

}

Can anyone help with this? I would like to than the swf file to have its own timeline and interaction.

If you want to re - use the charger, do not delete not and not null it.

Tags: Adobe Animate

Similar Questions

  • How the get function is available or not on the loaded swf file

    I have 100 swf file in one of my projects. And there is a common feature in some of the SWFs. All these files are loadded in the file main.swf. Here's my Question, "If have the common function is the swf file that is loaded, int how to trigger this funciton of the main.swf.

    Quite simply,.

                if(movieclip.test){
                    movieclip.test();
                }
    

    ('movieclip' is the loaded SWF file and "test()" is the function)

  • Calls to functions from loaded SWF files

    I have a Flex application that uses the SWFLoader object to load an external SWF file (which has also been developed in Flex) in a section of the page. The parent SWF file defines several variables and global functions in ActionScript I would use from all SWF files loaded in the SWFLoader. Is it possible in ActionScript to access the functions and variables that are defined in the SWF file the SWF load/child parent? The two SWF files are on the same domain, so there should not be problems of security.

    Peter thank you very much for your answer. I have tried loading in the same ApplicationDomain, but he did not what I expected from him. I, however, found the solution to my problem. I needed to understand how cross-script from a SWF file loaded the loaded SWF file. I discovered how and published a description of my conclusions on another thread that was no longer relevant to my question. The described solution has allowed me to do what I needed without touching the ApplicationDomain.

  • Problem with playing a loaded "SWF" file in the chronology of the pain

    Hey there. I created a presentation that loads the SWF interactive movies in a clip of 'target' on the main timeline.
    As you progress through the different presentation SWF movies are loaded into the presentation. And this in turn allows me to change the content of the presentations quickly and easily for different customers.
    These sovereign funds use part of the preloaded flash content like the other and drop-down list box objects.
    However, when these sovereign funds are called in the main charge they stop working properly.
    They work fine when tested independently of the main charge.

    Does anyone know how I can be able to get these sovereign funds work properly?

    At soon fofana

    The first thing to do is to check the range of your loaded SWF file. All references to _root, for example, means something different when the SWF is loaded in your film of wrapper.

    In addition, some of the V2 components do not work correctly when the SWF is loaded into another SWF. There is a technical Note and simple workaround here:

    http://www.Adobe.com/go/tn_19278

    Good luck!

  • Project Manager hangs during fired fresh files and copy them to the new location

    Hello

    Any project I have which includes a .mts file captured with a Panasonic GH1 camera causes the project manager in Premiere Pro (CC 2015 edition) to hang (several minutes and ends by hangs) when I do a "collect files and copy them to a new location. It creates a "xxxx. MTSBDMV' with a 'STREAM' record fo RL first file, but that is it. I can even reproduce with a new project with a single sequence, single clip.

    I'm under Premiere Pro CC 2015 edition on a Windows 10 machine. (I tried before 2014 CC edition WIndows 7 as well, same result, but I have not created a test case).

    An example of project (1,3 Mo) can be found at: Test_GH1_footage_collect_files_crash.zip - Google Drive

    Any suggestion for a solution or workaround are much appreciated.

    Thanks in advance,

    Arjan Mels

    Hi Albion,

    Thanks for your message and anxiety. I downloaded your sample project and media and was able to replicate your issue.

    Any project I have which includes a .mts file captured with a Panasonic GH1 camera causes the project manager in Premiere Pro (CC 2015 edition) to hang (several minutes and ends by hangs) when I do a "collect files and copy them to a new location. It creates a "xxxx. MTSBDMV' with a 'STREAM' record fo RL first file, but that is it. I can even reproduce with a new project with a single sequence, single clip.

    I don't know why these images give you so much trouble, but there are a few things to check.

    1. Where is the folder for multimedia file structure? All I see is the raw. Clip of MTS.
    2. In general, you copy all the SD card to your computer HD, then ingest via the media browser
      1. This allows all the metadata to clips to be implemented with the clip.
      2. The clip needs this metadata so that it works normally.
      3. Many publishers of band on the metadata by choosing File > import and do not ingest correctly via the media browser

    I suspect that this could be at the heart of your problems. You could try a try and ingest the images correctly, so try and move the project with the project manager. If it still does not work, please file a bug herereport.

    Once I transcoded your footage to ProRes LT using Adobe prelude, I could ingest images, create a sequence, then moved the sequence and associated media without problem.

    Thank you

    Kevin

  • How to say the script colse all files and save them, but not untitle docs

    Hello world

    I want colse open files and save them, but not the files that have never been saved.

    Try this script, but I ran after, all files are not saved.

    docs var = app.documents.
    for (var i = docs.length - 1; i > = 0; i--) {}
    if(App.activeDocument.Saved == false) {}
    docs [i]. Close (SaveOptions.no);
    }
    Another yew (docs [i] m:System.NET.Sockets.Socket.close (SaveOptions.YES));
    }

    can someone tell me what is the problem with the script?

    Thank you

    Respect of

    Teetan


    var docs = app.documents;
    for (var i = docs.length-1; i >= 0; i--) {
        if (docs[i].saved == false) {
            docs[i].close(SaveOptions.NO);
        }
        else {
            docs[i].close(SaveOptions.YES);
        }
    }
    
  • How do I know if a loaded SWF file have the source code?

    Hi!, I need to know if a loaded SWF file have the source code. I develop an application running on iOS and admin can upload SWF files that show in the APP, but I must know before show (mobile Adobe AIR APP) or activate (PHP script server), if this SWF file have the source code for no show or enable him not it.,.

    Thank you!

    I have it!

    Only that we need to do is:

    1. If the first tank is:

    F-the swf is uncompressed

    C - compressed with Deflate

    Z - compressed with LZMA

    2. If it is compressed, uncompress it with the right method

    3. search MainTimeline string, if concluded the SWF actionscript so it is not found, the code is not actionscript.

  • control the loaded swf file

    Hi all

    I am loading a swf into another SWF, I want to controll loaded swf such as play and pause the swf. The loaded swf file is an animation file, all animations are kept in a movieclip, then please tell me how I can control the animation.

    In your first assignment, you tell the animation is present in a movieclip.  If this movieclip is in the loaded swf file you will probably need to target this movieclip to tell him to play rather than the SWF itself, as in...

    currentSWF.movieclipName.play ();

    where movieclipName is replaced with the name of the instance of movieclip in the loaded swf file.

  • How to call the function lavel root & variable external loaded swf file

    I have little problem in as3.  I load 'mainmenu.swf' file "main.swf". through class loader. so now "main.swf" is children of parents 'mainmenu.swf' file how can call "main.swf" variable and function of "mainmenu.swf".

    The parent of the loaded swf file is the charger.  The main SWF is the parent of the charger.  Then to communicate with the main storyline of the loaded file can use:

    MovieClip (parent.parent) .someFunction ();

  • call the parent of a loaded swf file functions?

    Hi all

    I have a main Flash file that load other SWF files using loader objects.  I want to be able to call the methods of this main purpose since then in the loaded SWF files.  For example, I want the file loaded in order to add an event listener on the stage of the main file.  I found this example:

    http://flexcomps.WordPress.com/2008/09/01/AS3-calling-MyFunction-on-main-timeline-from-Loa ded - swf.

    That seems to do what I want, but I can't understand how to implement it in my setup.

    My "main" file that loads other sovereign funds is called "main.swf" and has a main document class.

    My loaded file is called start.swf and has a class of documents 'Start '.

    in my main constructor:

    var ethics_content:Loader = new Loader();

    ethics_content. Load (new URLRequest ('start.swf'));

    in the constructor of my departure:


    If (this.parent.parent! = null) {/ / IF the STATEMENT FAILS}
    var parentObj:Object = this.parent.parent as an object;
    trace ("parentObj has been found.'");
    } else {}
    trace ("this .parent .parent is null.");
    }

    stage.addEventListener (MouseEvent.CLICK, handle_click); GENERATES AN ERROR WHEN IT IS LOADED TO THE HAND. SWF

    trace ("step: ' + Stadium");  RETURNS A [STAGE] OBJECT BY OPERATING BY ITSELF, BUT NULL WHEN IT IS EXECUTED IN THE HAND. SWF
    trace ("root:" + root); RETURNS AN OBJECT [START] WHEN RUN BY ITSELF OR WITHIN THE HAND. SWF
    trace ("parent: ' + parent"); RETURNS A [STAGE] OBJECT BY OPERATING BY ITSELF, BUT NOTHING OF IN THE HAND. SWF
    trace ("this .parent:" + this.parent); RETURNS OBJECT STAGE ITSELF, NOTHING OF IN THE HAND. SWF
    trace ("root.parent:" + root.parent); RETURNS THE SCENE OBJECT BY ITSELF

    How to get to the scene of a loaded SWF file?  Or at least, how can I call a function in my main class from the loaded file start.swf so I can move the functionality I need the main.swf file?

    Any help is greatly appreciated.

    If your main swf loader is not added to the display list when it try {branch} is running, the charger will not have a parent.

  • To access the MovieClip instances in a loaded SWF file

    The situation as follows:

    loadedSWF.swf (published with Flash Player 8 AS2 or AS3 of Alpha Flash Player 9), contains on the symbols of the stage with the instance names: clipA, clipB, clipC, etc... No ActionScript is included in the file.

    In a Flex Builder 2.0 project, a component that extends mx.core.UIComponent load loadedSWF.swf:

    script
    var request: URLRequest = new URLRequest ("loadedSWF.swf");
    loaded var: Loader = new Loader();
    Loaded.Load (request);
    addChildAt(loaded,0);


    loadedSWF.swf successfully is displayed in the component's display list, but MovieClip instances that it contains are inaccessible.

    Its existence is verified:

    script
    trace (getChildAt (0)) / / result: [object Loader]
    trace (getChildAt (0) .root) / / result: [object _system_mx_managers_SystemManager]

    However, even if .root getChildAt (0) returns a mx.managers.SystemManager and mx.managers.SystemManager supports the numChildren property, trace (getChildAt (0).root.numChildren) survey error: 1119: access of the numChildren property possibly not defined through a reference with static type flash.display:DisplayObject.. Other methods like getChildAt(), etc. are also impossible to call. Direct access with getChildAt (0).root.clipA also throws an error, etc...

    Is it possible to access instances of the MovieClip on the stage of the loaded SWF file of a component that loads? I would appreciate any advice on this issue.

    a.Neko


    Note:
    The goal is to be able to load multiple clips into a component in a single loading of SWF file, then to instantiate the separately if necessary with addChild() and addChildAt() methods.

    Solution found:

    (Checked for loadedSWF.swf published with Adobe Flash Professional 9 Alpha Public)

    script (excerpt from Flex 2.0 AS3 component class)

    protected var clip: MovieClip = new MovieClip();

    protected final void requestSWF(value:String):void {}
    var request: URLRequest = new URLRequest (value);
    var asked: Loader = new Loader();
    requested.contentLoaderInfo.addEventListener (Event.COMPLETE, this.onRequestSWFComplete);
    requested. Load (request);
    return;
    };

    protected final void onRequestSWFComplete(event:Event):void {}
    event.stopPropagation ();
    This.clip = event.target.content.clipA; conversion of a local variable.
    this.addChild (this.clip);
    return;
    };

    this.requestSWF ("loadedSWF.swf");

    Result: clipA is added separately to the display of the component list.

    a.Neko

  • How to find corrupted files and remove them on mac i

    How to find corrupted files and remove them on i mac?  AM currently using OS x EL capitan 10.11.12 Mac said to run slowly and the recent upload did not work until the 3rd attempt.

    Thank you

    You do not have.

    You can run this program and post the results so that we can see what you have installed that could cause your problems.

    http://www.etresoft.com/etrecheck

  • How to use vbscript to find all corrupt them office files and delete them

    I have to browse a fileshare and locates all corrupted files (especially for office files) a sloppy migratory balance and remove them.  I've been running this process in a list provided by the seller, but this will be the 3rd time through.  I want to identify corrupted files and delete them.

    I will search through a windows 2008 Server fileshare.
    Any help would be appreciated.

    Hello

    The question you have posted is better suited for the MSDN forums. Please post your questions in the MSDN forums for assistance.

    Here is the link: http://social.msdn.microsoft.com/forums/en-US/categories/

  • What creative program Cloud would allow me to create a poll, send it to students and allow them to complete online and send it back?

    That creative cloud program would allow me to quickly create a survey, send it to students and allow them to complete online and send it back?

    Acrobat Pro or Std:

    Create PDF, PDF form creator forms | Adobe Acrobat DC

  • How can I open 2 different pdf files and show them separately on 2 different monitors?

    How can I open 2 different pdf files and show them separately on 2 different monitors?

    Hi thomasr1953,

    You will need to uncheck 'Open documents as tabs... new' under ' Edit > Preferences > general "so that the two PDF files open in separate windows.

    Then, you can drag the second file to the second monitor.

    Kind regards

    Ana Maria

Maybe you are looking for

  • Absolute links on page hml in the local directory does not

    All absolute links on my html pages (which are on my hardrive) are treated as local links and are therefore not work - i.e. Firefox adds the path of the local file before the url. For example, is the original link: http://www.insidehousing.co.uk/lega

  • Can I recover my saving a .tmp file?

    I exported my file a .aif, but something in the process of glitched at the end and the file saved as .tmp instead of .aif. Then garageband crashed before I could save the .band file, so I lost all the tracks in the project. The .tmp file is pretty bi

  • Graphic display of Portege R700 objects

    Display graphic artifacts R700-182, Windows 7 Pro 32 bit, bought Nov 2010 (so under warranty). Once the computer has been used for an hour, the product suddenly the laptop screen display artifacts. Usually, these are manifest as one or several repeti

  • How can we get the bootloader again closed?

    Hello I unlocked the bootloader on my Xperia thumb with "fastboot.exe-i 0x0fce oem unlock 0 x."course. " Since then refused SUS or PCCompanion update to a newer version of Android. It appears the error code "2003". How can we get the bootloader again

  • Blue error screen when indexing the files on Vista computer

    Original title: Problem Event Name:_BlueScreen__ OS Version:_6.0.6002.2.2.0.768.3__ Locale ID:_1033__ BCCode: f4 BCP1: 00000003 BCP2: 872E2D90 BCP3: 872E2EDC BCP4: 81E33710 OS version: 6_0_6002 Service Pack: 2_0 Product: 768_1 Before I tear off my ha