rinsing of the SWF loaded phase target mc?

Hi, I'm using buttons to send the playhead to executives in which sovereign wealth funds are then loaded into an empty movieclip called "stage_target_mc"... .how I can then flush out the previously loaded swf then only a newly loaded swf displayed in "stage_target_mc"?  For example, after you click on the button 'about' swf 'about' load... then the "concepts" click the "concepts" swf loads - but the previously 'about' loaded swf plays again... I wish I could rinse the swf 'about' so only "concepts" are display, in this example.  Thank you!

code associated with buttons that are used to send the playhead to frame "concepts" or "about":

about_btn.addEventListener (MouseEvent.CLICK, displayAbout);

function displayAbout(e:MouseEvent):void {}

root.gotoAndStop ("about");

}

concepts_btn.addEventListener (MouseEvent.CLICK, displayConcepts);

function displayConcepts(e:MouseEvent):void {}

root.gotoAndStop ("concepts");

}

code on frame called "concepts":

stage_target_loader. Load (new URLRequest("swfs/stages/concepts.swf"));

MovieClip (root).stage_target_mc.addChild (stage_target_loader);

code on frame called 'a way':

stage_target_loader. Load (new URLRequest("swfs/stages/about.swf"));

MovieClip (root).stage_target_mc.addChild (stage_target_loader);

Before loading, try to use the method of the Loader class unloadAndStop() If you are using a version of Flash newr

Tags: Adobe Animate

Similar Questions

  • white box flashes before the SWF load

    I am embedding my swf using SWFobject file but I get a white box, flashing until the swf file is loaded. I tried all the suggestions, but I still have the problem.

    The Flash file and the browser background color is the same. Any new idea on how to solve this problem.  I'm a casual AS3 programmer, I'm just learning to be able to do my own Web site.

    You can take a look at a problem in www.carlosNmolina.com

    Thanks in advance.

    Hello

    Yes, the famous "white lightning" is caused by SWFObject, but is more or less a bug; Just to set the bgcolor parameter, otherwise it's default white:

    var params = {bgcolor: '#000000'};
    swfobject.embedSWF ("my.swf", "flash", "100%", "100%", "10.0.0", false, {}, params");

    Easily attaches.

    (Here it is SWFObject 2.2. It's the 8th budget in the declaration of swfobject, and of course, the color is the color of your choice.)

    ____________________

    Design Cyboide

    Web site creation

  • Go to the second picture in the SWF loaded using Adobe AIR

    Hello

    I am a beginner to Adobe AIR. That I am charged an external SWF file in the AIR.

    But I can't go straight to the second image of this external SWF file of the AIR.

    How to load the second image of the external swf file. ?

    Thanks in advance.

    You must wait for function Event.COMPLETE the Loader to trigger to ensure that it is fully charged. After access the content of the loader property to access the MovieClip inside, for example:

    swfloader.addEventListener (Event.COMPLETE, onComplete);

    function onComplete(e:Event):void

    {

    var mc:MovieClip is MovieClip (e.target. content);.

    go to section 2

    mc.gotoAndPlay (2);

    }

  • How to script instead of JPG files SWF files in the XML loader?

    I have a SWF (platform greensock.com) charger and a thumbnail image scroll under it made small image buttons. Each button image has a link that loads a SWF file into the SWF loader above. Here is the code for each button that loads the largest SWF in the charger above:

    Button3.addEventListener(MouseEvent.CLICK, Button3_PlayPopUp);
    
    function Button3_PlayPopUp(event:MouseEvent): void { 
        //setting the sourceVar
        sourceVar="3.swf";
        //making the SWFLoader load
        //as setting the soureVar after the SWFLoader is created won't do anything unlesss 
        //I also re-create the SWFLoader with the new sourceVar when the button is clicked
        loader_howToLoader2.url = sourceVar;
        loader_howToLoader2.load(true);
        
    }
    

    Then I decided to load all the button via the XML loader. I followed the tutorial on XML Chargers which deals with loading jpg images, and by assigning the URL links to them as follows in the XML file:

    <image src="appThmb_imgs/appThmb_imgs117x175/A-illuminatorUpLit_117x175.jpg" title="UpDownGlowingVase" url="http://www.888acolyte.com"/>
    
    

    and then in AS3 like this:

    var xmlLoader:URLLoader = new URLLoader();
    
    thisOne.link = imageList[item].attribute("url");
    
    
    
    function clickScrollerItem(e:MouseEvent):void {
     //trace("clicked item " + e.currentTarget.itemNum + " - visit url: " + e.currentTarget.link);
     var urlRequest:URLRequest = new URLRequest(e.currentTarget.link);
     try {
     navigateToURL(urlRequest);
     }
     catch (e:Error) {
     // handle error here
     trace(e);
     }
    }
    

    My question is: How can I ask for the code to every each small button thumbnail to load a larger image in the SWF loader above? I have to add something to the XML file or this way, it will never work with jpg images? URL in the adjustable XML source var (//setting the sourceVar), because they are all individual and somehow then apply taken SWL loader to load the game (//making load SWFLoader) as a standard somewhere in the AS3 code?

    Yes, you did.  I missed that.

    If you have used the link instead of urlString:

    function clickScrolleritem(e:MouseEvent):void {}

      loader_howToLoader2.url = MovieClip(e.currentTarget).link;
        loader_howToLoader2.load(true);

    }

  • Project cannot find the files loaded each time.

    When I opened my project, several files are not found during the research/loading phase until the project is actually open, and the "Search _ VI Named" window appears. The window opens in the same directory displayed in the "loading:" field and the file is there. I have to select the file and click OK to load the file manually. This happens for 50 files. It is quite tedious and takes a long time to open and it happens everytime I load the project.

    I tried opening the project, make a backup of all and then closing and reopening, which did not help to solve the problem. I have to mention that I was working on VI of script and modify these files from another project, so I think I might break a link to the project somehow. Does anyone know how I can force the project actually find these files when loading?

    Thanks in advance for the help.

    Thanks for the suggestions everyone. I was able to solve the problem by deleting all files in the project and time them. I had tried before but must have done something different this time.

  • SWF swf communication - swf loaded swf loading

    Hello
    I read the article by kglad SWF SWF communication when two SWF files uses actionscript 3.0 gratefully, but, probably because of my stubbornness, I have swf loaded at loading swf communication problems to work for me.

    Loading of swf (swf1.swf) as loaded swf (swf2.swf) by casting to a MovieClip loader.content worked well for me.

    I want the swf to call a function on the timeline of the swf file loading.  (Aside, I'm doubting it's possible, but I'm really very uneducated on this topic)

    I copied the article code in swf2.fla as below;

    Create a variable to refer to the main scenario for swf1

    var swf1Main_mc:MovieClip; This assumes that swf1 is a movieclip.

    Create your listener to ensure that loaded swf has been added to the display list and can get a

    the reference to the main timeline (which is always the main timeline of the SWF loading).

    this.addEventListener (Event.ADDED_TO_STAGE, initF);

    function initF(e:Event):void {}

    swf1Main_mc = MovieClip (this.root);

    }

    and add a simple button with an event listener for mouse to invoke a function (in swf2) for example

    function btnClicked(e:Event)

    {

    swf1Main_mc.showME ();

    }

    where showME() is a function in swf1.  for example

    function showME()

    {

    trace ("swf1 called swf2 showME");

    }

    All I get is a runtime error "TypeError: Error #1006: showME is not a function."  to swf2_fla::MainTimeline/btnClicked().

    I took out what little hair remains try different variations in the code then, in desperation, please someone can spot what I'm doing wrong or point me in the right direction?

    Thanks for your time,
    Bob

    A loaded swf file should not try to control its parent.  The child must only be send an event to the parent to take action.  In this way, the child is completely independent of the parent as well as to be able to publish on his own.  To load completion than the parent must assign an event listener to the child for this event, and the event handler function.

    Example:

    Add something to raise the event in the child:

    dispatchEvent (new Event ("eventTriggered")); (if problem dispatchEvent, see: http://www.kirupa.com/forum/showthread.php?p=1899603#post1899603)

    In your SWF to loading/parent, listen for the complete event on the Loader.contentLoaderInfo.  In the complete event handler, add a listener for the event on the loaded swf file.

    triggered when external swf loading event handler
    function loaderCompleteHandler(event:Event) {}
    MovieClip (event.currentTarget.content) .addEventListener ("eventTriggered", eventHandler);
    }

    function eventHandler(event:Event):void {}
    trace ("event sent in loaded swf");
    }

  • How to effectively remove a SWF loaded from the scene?

    I can't understand a correct coding to remove a SWF loded in the scene.

    Here is my set upwards.

    I have a layout that is segmented in section labeled. In the section titled 'products', I have a scheme consisting of images of products acting as buttons that bring a user in another section labeled "prdctsPopUps."

    In the "prdctsPopUps" section, I placed an instance of LoaderMax placed in a container of mc. Place LoaderMax in a container of mc automatically resolved a problem of clearing loaded SWFs from the stadium when I go back to the section "products".

    I specified the variable in the "products" section with the following set up:

    var sourceVar_ProductsPopUps:String;

    function onClickSumix1PopUp(event:MouseEvent):void {}

    sourceVar_ProductsPopUps = "prdcts_popups/sumix1 - popup_tl.swf ';

    gotoAndPlay ("prdctsPopUps");

    }

    So each button has its own "... swf ' URL and they all open very well and I can go back to the topic 'produced' without any problem.

    However inside the swf (that charge by LoaderMax which is placed in a mc) there are other buttons that lead a user to the section labeled "xyz". That works as well. It opens as he's supposed to be and without any previously loaded "... swf ' on the stage.

    In the section labeled "xyz", there is a limited set of buttons with the heading 'products' that must raise a user to the same game in the labeled 'prdctsPopUps' section and open a correspondent "... swf»

    However only the last opened "... swf" will appear in this section. Actually the only one that has been opened at the origin of the "prdctsPopUps" section, not who was supposed to be opened from the section "xyz".

    I do not understand why it would work a labeled section and not the other. I can't know which section what function/code should be placed.

    Here is the set up through a button in the section "xyz" supposed to bring a user to the same section of "prdctsPopUps" but to load another '... swf»

    var sourceVar_ProductsPopUps_fromXYZ:String;

    function onClick_floralytePopUp_fromXYZ(event:MouseEvent): void {}

    sourceVar_ProductsPopUps_fromXYZ = "prdcts_popups/floralyte - popup_tl.swf";

    gotoAndPlay ("prdctsPopUps");

    }

    Here's the code in place for the LoaderMax of the section "prdctsPopUps":

    var loaderProductPopUps:SWFLoader = new SWFLoader (sourceVar_ProductsPopUps,

    {

    estimatedBytes:5000,

    container: holderMovieClip,.

    onProgress:progressHandler,

    onComplete:completeHandler,

    centerRegistration:true,

    Alpha: 1,

    ScaleMode (ScaleMode): 'none',

    Width: 540,

    height: 730,.

    harvest: true,

    autoPlay:false

    });

    function progressHandler(event:LoaderEvent):void {}

    progressBarPopUp_mc.gradientbarPopUp_mc.scaleX = loaderProductPopUps.progress;

    }

    function completeHandler(event:LoaderEvent):void {}

    var loadedImage:ContentDisplay = event.target.content;

    TweenMax.to (progressBarPopUp_mc, 1.5, {alpha: 0, scaleX:0.25, scaleY: 0.25});

    }

    loaderProductPopUps.load ();

    Is there something that must be imported, or specific function must be specified in a specific titled section?

    in fact, I think that you will need to use something like:

    var loaderProductPopUps:SWFLoader;

    If ((loaderProductPopUps) {})

    {if (loaderProductPopUps.Content))}

    loaderProductPopUps.unload ();

    }

    }

    loaderProductPopUps = new SWFLoader (sourceVar_ProductsPopUps, //the value of sourceVar_ProductsPopUps allows to load several SWF files from the page produced.

    {

    estimatedBytes:5000,

    container: holderMov ieClip, / / convinient and easy to manage cases of placing the LoaderMax one mc empty (holderMovieClip)

    If this is not the case, will work as well. Then the container line: holderMovieClip, must be replaced by container: cela,.

    can be any size, cannot be resized as it distorts the content

    Manager onProgress:progress,

    onComplete: complete the Manager.

    centerRegistration: true,

    x:-260, y:-320, //no need for that is if used: centerRegistration:true,.

    Alpha: 1,

    ScaleMode (ScaleMode): 'none',

    scaleX:0, scaleY: 0,

    vAlign: "high."

    Width: 540,

    height: 730, / / scale proportionately but I need to cut the edges

    harvest: true,

    autoPlay:false

    });

    function progressHandler(event:LoaderEvent):void {}

    progressBarPopUp_mc.gradientbarPopUp_mc.scaleX = loaderProductPopUps.progress;

    }

    function completeHandler(event:LoaderEvent):void {}

    var loadedImage:ContentDisplay = event.target.content;

    TweenMax.to (loadedImage, 1.5, {alpha: 1, scaleX:1, scaleY: 1}); only need this line if the corresponding values are changed in Builder SWF loader

    TweenMax.to (progressBarPopUp_mc, 1.5, {alpha: 0, scaleX:0.25, scaleY: 0.25});

    }

    loaderProductPopUps.load ();

  • Need to control the scaling a swf loaded when called from a file containing swf

    Flash Professional 11 (build 11.0.2.489)

    Problem: when a SWF is loaded into a SWF containing the swf called scales to fill the window. When the stand alone SWF is played from a HTML or SWF format, it does not adapt and display correctly. I tried to adjust the dimensions of the stage, publish settings, etc. nothing works.

    My swf container has a Clip called contentContainer and three buttons. The buttons just addChild (selected swf) and removes the current swf child.

    Is there a way to control the scaling of a swf file loaded into another swf?

    The relevant code after calling the functions of office is as follows:

    function onCompletePreloading (): void
    {
    contentContainer.addChild(_swfClipsArr[0]);


    IntroButton.addEventListener (MouseEvent.CLICK, setContent);
    drilldownButton.addEventListener (MouseEvent.CLICK, setContent);
    EnterDatesButton.addEventListener (MouseEvent.CLICK, setContent);
    }

    function setContent(event:MouseEvent):void {}
    var _swfToAdd:MovieClip;
    {switch (event.target.name)}
    case "IntroButton":
    _swfToAdd = _swfClipsArr [0];
            break;     

    case "drilldownButton":
    _swfToAdd = _swfClipsArr [1];
            break;  

    case "EnterDatesButton":
    _swfToAdd = _swfClipsArr [2];
    break;

        }

    contentContainer.removeChildAt(contentContainer.numChildren-1);
    contentContainer.addChild (_swfToAdd);
    trace (_swfToAdd.customID);

    }

    instead use:

    contentContainer.addChild (_swfToAdd);

    use:

    addChild (_swfToAdd);

    or, if you use this parent to a design:

    var mc:MovieClip = new MovieClip();

    mc.addChild (_swfToAdd);

  • How to control the video swf loaded in the loading component?

    I have an external swf file loaded into the loading component. The external swf loaded into the component loading stops at departure. I want to play by a button outside the loading component that is located in the main swf movie. CAN SOMEONE HELP ME CONTROL THE VIDEO SWF LOADED INTO THE COMPONENT OF LOADING EXTERNAL?

    You can target the SWF via the content property of the UILoader.  If the name of the instance the UILoader is ldr...

    MovieClip (ldr.content) .play ();

  • Best way to target a swf loader?

    In AS2, I created tons of projects where I've used _level0 as my main menu and to other sovereign wealth funds (for example, the tutorial chapters) incoming and outgoing _level1. My SWFs into _level1 acceding variable such as dates, username and those resident in _level0. I recreate it in AS3 using the class loader which works fine until I try to access the variables in my main swf. For example, menu.swf has a button that loads chapter_1.swf. This chapter_1.swf must Access a variable called userName string in menu.swf and display it in a text field. In AS2, I would simply write user_txt.text = _level0.userName. How do I do that in AS3? I know it's probably very easy, but I have not been able to target the menu.swf. I searched high and low for this answer, but I shouldn't be looking properly.

    I thank in advance for any help, you may be able to provide.

    Rob,

    You were very close to the solution in your first answer. I added an extra parent to your code and it worked. I think that's what kglad tried to tell me. The single parent was pointing the charger itself against the main timeline. So the correct code is:

    . UserName MovieClip (parent.parent)

    Thanks to each of you for your help.

  • load the swf video

    So, I have already created my flash movie and I added the activeX container and everything works fine until I have create the .exe application.

    in the properties of the activeX > movie properties > what should I put for the load movie when I deploy the application on another computer. (I have already added the .swf file to the project)

    Lets say that the est...\sensor\sensor.exe application and the application will always be in the same folder how don't do so activeX load the movie in the same folder no mater if the folder is located in c:\ or f:\

    I hope I'm at least one semi-claire,

    Thank you

    You can use the information in path and of the function of path of the band on the current VI to determine the current path.  But the path for a VI that is embedded in a .exe is different from the development environment to be taken into account.  See this KB. http://digital.NI.com/public.nsf/allkb/FD7DE8BC8FFC256C862565F4006BE363

  • Swf load time of the text change

    "" Hello everyone, I work with presenter 9 and I would like to know if we can change the duration of the swf file loading "loading text. I want the text to stay longer on the screen. Is there anyone who knows? Thank you very much. Sylvie

    That text appears for the duration it takes to load the first three blades. If you do the first three largest slides in the file size (add great graphics or video content) then it won't be loading poster screen. You can also create your own screen "loading" as the first slide in the presentation and you would be able to dictate the durration of this slide based on the amount of silence or audio that you place on this slide.

  • Kitkat Android cause the loading of the SWF from device. Found but URL doesn't work

    Hello


    I am facing a problem for a long time about the access to the files in Kitkat Android version 4.4. *. I developed the Player Adobe Air for android app, and it does not work as expected following kitkat version but not on kitkat.

    I'm following this methods.

    1. NativeApplication.nativeApplication.addEventListener (InvokeEvent.INVOKE, onInvoke);

    public void onInvoke(event:InvokeEvent):void

    {

    var newFile:String = String(event.arguments[0]);

    trace ("new file received from Android:" + newFile)

    }

    Received in Android Kitkat - form URL device

    /Storage/emulated/0/.iProfData/SWF/playListFiles/ContentCreation/Ma_V2_522/en/animation/27 031_1_Welcome screen.swf

    file:///storage/emulated/0/.iProfData/SWF/playListFiles/ContentCreation/Ma_V2_522/en/Anim creation/27031_1_Welcome screen.swf

    -Loading of the URL by using the class loader in AS3 AIR but does not.

    file%3A///storage/emulated/0/.iProfData/SWF/playListFiles/ContentCreation/Ma_V2_522/en/ANI mation/27031_1_Welcome%20screen.swf

    -Have you used also by making the escape character, but still it is not working display of the file not found case both SWF and mp4. (Case of Mp4 NetStream.Play.FileNotFound)

    Using the above methods, I can have the url of the swf or mp4 video but when I load, it doesn't work error message that gives "file not found / IO Error. I read that if avoidance of the use of characters and then it will work but I used as escape character but it does work.

    Humble ask you to inform you please how I can solve this problem.

    Best regards

    Sunil Kumar

    From KitKat, Google requires that applications have access to the files on the system. You must specifically add READ_EXTERNAL_STORAGE or WRITE_EXTERNAL_STORAGE permissions in order to access the files. Adding or the other of these permissions should allow you to read / access to the files on the device. Before KitKat, you must have these permissions listed in the manifest to the files.

  • AS3 pass variable values of external swf loaded in the parent swf format

    Hello

    I'm working on an e-Learning project that uses a main SWF (SWF1) and a second SWF (SWF2) with 2 quizzes in it. Published in the ATMOSPHERE for Desktop and Android, SWF1 and SWF2 are packed together in the Office of AIR or AIR APK exports.

    I use a charger in SWF1 to compose and execute SWF2. What I am having difficulties with, need help, is how to get 2 2 SWF2 quiz scores and load these values (each is a number) return SWF1. Once back in SWF1, they will be written to a string and then displayed in a text box using textbox.text.

    While I searched online and found examples to send variables from parent to child of the SWF file, so far not able to find an example of script understandable/useable AS3 to get variables from child to parent SWF.

    Any help appreciated.

    Best wishes

    The best way to communicate between parent and child SWFs is through events. Send an event to the child with the data to send and intercept the event to the parent level. This flow is common and very easy to handle

  • By using the fonts loaded in child swf

    Hello

    I have an ad container that loads a handful of resources some fonts, and some are sovereign. My problem is that the font is loaded from a url, it is registered and it works well points for textfields created in the ad container. The problem is that when I try to incorporate into the textfields in some of these sovereign funds management, it does not.

    The police charge and gets saved before the swf file is loaded. The SWF then gets an event saying to incorporate the police there as well. When checking, inside the child SWF file, the Font.enumerateFonts table () I see that the fonts have been properly registered. My problem is that even if this table shows me the fonts, when I try to incorporate into the child SWF that nothing is displayed. I even use something like myTextFied.font = Fonts.enumerateFonts () [0] .fontName, while IncorporerPolices is true and antiliasing is set to advanced.

    I tried all sorts of ways, and none does not work. The police who are responsible is stored as a library item with a link within a SWF file. Then to load a font that I load the SWF file containing the font. It works very well for the ad (main SWF) container, but not to children SWFs.

    Any suggestions?

    Thank you very much!

    Vlad

    You should maybe create an instance of the class from the police and save the police in each loaded swf file. It is a RSL approach.

    This post describes the idea:

    http://krasimirtsonev.com/blog/article/AS3-Flash-runtime-font-loading-embedding

Maybe you are looking for

  • Compatibility of Selfie Stick with 6 s iPhone?

    What sticks selfie are best for the iPhone 6 s?

  • Constant errors of Satellite U400-15B & jams

    Hi all I've only had the laptop for months cutting and reently started having problems with the thing just lock up and freezing with no response to keyboard entries that starts to be really annoying, so if someone can help please tell me how to fix t

  • Lenovo G560 keyboard works do not at all

    Keyboard laptop Lenovo G560 of my brother stopped working really suddenly, he was trying to connect to Facebook; When he went to type his password, nothing on the keyboard worked. What could possibly be the cause? We rebooted, tried to start in safe

  • OfficeJet 6500: E709a printer

    Printer was printing fine until the person he disconnected from the wall while he was. Got a prompt saying not to do. Now, he goes through the motions but the pages are blank. I have a MAC computer.

  • Screen size icon / lost for internet exp at the top.

    programs and windowshave missed one of large size. Broad for effective use. Lost icon for internet exp at the top.