ContainerController issue when load child swf

Hello

I have swf parent (test.fla). Simply, it will load a child swf (child.fla).

Parent once loaded the child swf file I can acess point of the child and its clips.

Question:

When I manufacturer a variable like "ContainerController", the swf parent not able to gain access to clips of the child. How to solve this problem?

When I do not include "ContainerController" in child swf, I got the track of the parent as a class (its what I expect)

[object MainTimeline]

-> MC

MC1->

When I include "ContainerController" in child swf, I got the track of parent (litigation) class

[object MainTimeline__Preloader__]

instance3->

instance5->

Here you can get the demo files for your reference: https://rapidshare.com/files/3986374440/test.rar

Thank you

Siva

Click file > publication settings > advance settings actionscript (key next to the drop-down list icon script) > library > default connection > merged with code > ok > retest.

In addition, here are all the ways to communicate between two files, as3, http://kb2.adobe.com/community/publishing/918/cpsid_91887.html

Tags: Adobe Animate

Similar Questions

  • Flash cs6 3.8 AIR app questions: can not load child SWF files

    Hello - I have a flash for ios application that loads external swf child on a button click; When I use AIR 3.8 I can't load. Everything works fine on the generator to preview, but when I publish the device, none of the child SWFS play; It's very strange! Help, please... I don't really know why it doesn't work.

    Here is the code on the main timeline to load the child swf file:

    Start button

    start_button_TRI_herrerasaurus.addEventListener (MouseEvent.CLICK, fl_ClickToLoadUnloadSWF_04_3, false, 0, true);

    Import fl.display.ProLoader;

    import flash.events.Event;

    var fl_ProLoader_04: ProLoader;

    This variable keeps track of if you want to load or unload the SWF file

    var fl_ToLoad_04:Boolean = true;

    function fl_ClickToLoadUnloadSWF_04_3(event:MouseEvent):void

    {

    If (fl_ToLoad_04)

    {

    fl_ProLoader_04 = new ProLoader();

    fl_ProLoader_04.load (new URLRequest("dinofilms/triassic_herrerasaurus.swf"));

    fl_ProLoader_04.contentLoaderInfo.addEventListener (Event.COMPLETE, onComplete_04)

    addChild (fl_ProLoader_04);

    fl_ProLoader_04.x = 0;

    fl_ProLoader_04.y = 144;

    }

    on the other

    {

    If (fl_ProLoader_04! = null) {}

    removeChild (fl_ProLoader_04);

    fl_ProLoader_04.unloadAndStop ();

    fl_ProLoader_04 = null;

    }

    }

    fl_ToLoad_04 =! fl_ToLoad_04;

    }

    function onComplete_04(e:Event):void {}

    e.currentTarget.content.addEventListener (Event.ENTER_FRAME, OEF_04);

    }

    function OEF_04(e:Event):void {}

    If {(e.currentTarget.currentFrame is e.currentTarget.totalFrames)

    e.currentTarget.stop ();

    e.currentTarget.removeEventListener (Event.ENTER_FRAME, OEF_04);

    removeChild (fl_ProLoader_04);

    fl_ProLoader_04.unloadAndStop ();

    fl_ProLoader_04 = null;

    }

    }

    for air for ios 3.6 +, you need TO report a loadercontext even if there is no actionscript in the loaded swf file:

    var loader: Loader = new Loader();

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

    Loader.Load (new URLRequest("dinofilms/cretaceous_ankylosaurus.swf"), _lc);

  • Slider component does not not when loading another swf file

    I have a simple Flash app that uses a Slider to increase or decrease the size of text in a TextArea (ta). It works perfectly well on its own, however, when I try to load the SWF from another application, I get the following error...

    ReferenceError: Error #1069: Property fl.managers:IFocusManager::form not found
    on fl
    .managers.FocusManager and there is no default value.

    at fl
    .controls::Slider/thumbPressHandler()

    Code of...

    import fl.events.*;
    import flash.text.TextFormat;

    ta
    .text = "Lorem ipsum dolor sit amet";

    var tf:TextFormat = new TextFormat();
    tf
    .color = 0xCCCCCC;
    tf
    .font = "Trebuchet MS";
    tf
    .size = 12;

    slider
    .addEventListener(SliderEvent.THUMB_DRAG, sliderChange);

    style
    ();

    function style():void
    {
        ta
    .setStyle("textFormat", tf);
    }

    function sliderChange(e:SliderEvent):void
    {
        tf
    .size = slider.value;
        ta
    .setStyle("textFormat", tf);
    }

    Pourrait swf file containing I'm loading the SWF of cursor indeed anyway demand of cursor? I do not understand why it works on its own, but not when loaded from another application.

    Add a component slider in the library of the main SWF (loading).

  • AIR flash application can not load child SWF on publishes on device

    I have been struggling with this problem for WEEKS now and can not solve. I have a soft flash AIR (creative cloud, AIR 3.8) that is very simple: there is no that load external SWF movies on the click of a start button. It works FINE in test/PC but when I publish to the device, the external swf will not load.

    Here is the code on the main timeline that calls the external swf:

    Start button

    start_button_TRI_desmatosuchus.addEventListener (MouseEvent.CLICK, fl_ClickToLoadUnloadSWF_02_3, false, 0, true);

    Import fl.display.ProLoader;

    import flash.events.Event;

    var fl_ProLoader_02: ProLoader;

    var fl_ToLoad_02:Boolean = true;

    function fl_ClickToLoadUnloadSWF_02_3(event:MouseEvent):void

    {

    If (fl_ToLoad_02)

    {

    fl_ProLoader_02 = new ProLoader();

    fl_ProLoader_02.load (new URLRequest("dinofilms/triassic_desmatosuchus.swf"));

    fl_ProLoader_02.contentLoaderInfo.addEventListener (Event.COMPLETE, onComplete_02)

    addChild (fl_ProLoader_02);

    fl_ProLoader_02.x = 0;

    fl_ProLoader_02.y = 144;

    }

    on the other

    {

    If (fl_ProLoader_02! = null) {}

    removeChild (fl_ProLoader_02);

    fl_ProLoader_02.unloadAndStop ();

    fl_ProLoader_02 = null;

    }

    }

    fl_ToLoad_02 =! fl_ToLoad_02;

    }

    function onComplete_02(e:Event):void {}

    e.currentTarget.content.addEventListener (Event.ENTER_FRAME, OEF_02);

    }

    function OEF_02(e:Event):void {}

    If {(e.currentTarget.currentFrame is e.currentTarget.totalFrames)

    e.currentTarget.stop ();

    e.currentTarget.removeEventListener (Event.ENTER_FRAME, OEF_02);

    removeChild (fl_ProLoader_02);

    fl_ProLoader_02.unloadAndStop ();

    fl_ProLoader_02 = null;

    }

    }

    I called about 30 different movies to 30 different images, that's why I use words such as "proLoader_01" so I don't duplicate them. All external SWFs are of course in the files included too.

    I would really appreciate the help, I am a reluctant coder!

    Post edited by: Fiona Passantino

    Yes, this is important when you load SWF actionscript files to contain and you need only actionscript work and are something I alluded to message 9.

    It is not relevant to your problem, unless you have poorly explained the problem.  from your description, you do not see the loaded SWF files to load.  If the SWF load really smoothly, but they contain actionscript code that does not work, you must fix your problem description.

    ****************************************************************************************** *********

    Edit: the above is not correct.  you do need to declare a loadercontext when loading an external swf with the latest (3.6 +) SDK of air even if the external swf contain no actionscript.  Otherwise, the load() method (and any code appearing later) fails to run

    then, use something like:

    loader = new Loader();

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

    Loader.Load (new URLRequest("dinofilms/cretaceous_ankylosaurus.swf"), lc);

  • Preserve the cadence when loading a swf into another

    Is there a way to preserve the cadence of a swf file when loading into another swf that plays at a higher rate. I load some flash ads that work for most to around 12-15 frames per second in a portfolio site that revolves at approximately 40 frames per second. All my ads play too fast. The link is:

    www.dg8tal.com/portfolioidea.html

    Thank you!

    You can use the code below the dotted line to play (and stop) the movieclip to frame m to n fram to any framerate (fps) allows to manage the host computer:

  • Issue when loading metadata

    Hello

    I am trying to load the metadata of a shared dimension in an epma planning an application using the contour load utility, but something is wrong. I use a Plant.csv file for the metadata and here's my test file format.


    Plant, Parent, data storage

    123, ABC, store

    456, ABC, store


    When I run the utility to load the file, this is the message that appears in the log file


    Input file located and opened successfully "Plant.csv".

    Record header fields: plant, Parent, data storage

    Find and use the 'Factory' dimension for the loading of the data in the application 'TEST '.

    Loading dimension 'Factory' has been successfully opened.

    A refresh of the cube operation will not be run.

    Create filters for safe operation will not be performed.

    Look at the files of newspapers of Essbase to status if Essbase data have been loaded.

    Planning of vector data store finished loading processes. 2 data has been read, 2 data records have been processed, 0 were loaded successfully, 2 were rejected.


    It also generates the error in the error log that says "com.hyperion.planning.InvalidMemberException: the ABC member does not exist or you do not have access to it."


    I see that the member exists in the outline of the application. I don't know what I am missing or incorrect to do. Please help me with your entries.


    Please let me know your thoughts and help!


    Thank you.

    If it is an application of EPMA then you need to load the metadata for EPMA and not directly in the planning, the contour load utility is for Classic applications

    See you soon

    John

  • Error when loading a swf file created in flash cs4, inside a flex application

    Hello

    I created a rotating logo in flash cs4 using motion presets, named logoRotar.swf. I've used this within my flex application:

    "< mx:SWFLoader width="33.33% "height ="100% "source =" assets/logoRotar.swf ">

    When I run the flex application, I get this error message:

    VerifyError: Error #1014: class flash. geom::Matrix3D is not found.

    Global $init)
    at fl.motion::AnimatorFactory3D/getNewAnimator()
    at fl.motion::AnimatorFactoryBase/addTargetInfo()
    at logoRotar_fla::MainTimeline()

    I also tried to add import flash.geom. *; statement in my flex application, I always get the same message.

    Flash player 10,0,22,87 is underway in my browser.

    Please help me...

    See you soon!

    Deepak

    Download Flex 3.3 and use-target-Player = 10

    Alex Harui

    Flex SDK Developer

    Adobe Systems Inc..

    Blog: http://blogs.adobe.com/aharui

  • Child .swf problem

    Hello, I was hoping that someone may be able to help me with a problem I've been and unloading external .swfs, ill try to explain this better than I can.

    I have two .swf files, that are connected to an external .as file. One is the main, the other is the child being loaded in the main .swf file. The user clicks a button in the .swf main trigger of a function contained in the .as file that load child .swf.

    Now, I have a Boolean variable in the child .swf, which gets the value true to a certain part of the movie, this variable is sent in the .as file then taken the start of a function using ENTER_FRAME to unload the movie (unloadAndStop ()). The problem, I think I'm having is the sprite container (which is created in the .as file), is not recognized as a child, so will not unload. However if I create a CLICK MouseEvent and point it at the sprite unloadAndStop() function works well, but I would like to avoid that if possible. That's what I have in the .as file:

    (endFind is the Boolean value is set in the child .swf and the loadSWF() is called by a button in the main .swf)

    import flash.events.Event;

    var url: String = "objectSearch.swf";
    var _Req:URLRequest = new URLRequest (url);
    var _swfLoader:Loader = new Loader();
    var _swfContent:Sprite = new Sprite();
    var endFind:Boolean;

    function loadSWF (): void {}

    _swfLoader.load (_Req);
    _swfContent.addChild (_swfLoader);
    addChild (_swfContent);
    setupListeners (_swfLoader.contentLoaderInfo);
    }

    function setupListeners(dispatcher:IEventDispatcher):void {}
    dispatcher.addEventListener (Event.COMPLETE, addSWF);
    }
    function addSWF(event:Event):void {}
    event.target.removeEventListener (Event.COMPLETE, addSWF);
    _swfContent = event.target.content;
    }

    function unloadSWF (): void {}
    _swfLoader.unloadAndStop ();
    trace ("unloadSWF:", _swfLoader.unloadAndStop ());

    //!!!!!! removeChild throws ArgumentError: Error #2025: the supplied DisplayObject must be a child of the caller.//!

    removeChild (_swfContent);
    _swfContent = null;
    }

    Adding a mouseEvent to sprite seems to work ok
    _swfContent.addEventListener (MouseEvent.Click, endCheck);
    function endCheck(e:MouseEvent) {}
    trace ("Click");
    unloadSWF();
    }
    This is not because of the method unloadAndStop().

    addEventListener (Event.ENTER_FRAME, endCheck);
    / * function endCheck(e:Event) {}
    {if(endFind==true)}
    unloadSWF();
    }
    }*/

    If you need more information please let me know. I really appreciate everybodys help and comments.

    A better way to deal with children is to listen only for them to say something and then take action.  What that means, it's basically the child to have just send an event and have the parent look for him so that he could take action.  So for this you need to assign a listener to the object after it has loaded...

    function addSWF(event:Event):void {}

    event.target.removeEventListener (Event.COMPLETE, addSWF);

    _swfContent = event.target.content;

    MovieClip (_swfContent) .addEventListener ("unloadMe", unloadSWF)

    }

    and set the unloading feature to be the event handler...

    function unloadSWF(evt:Event):void {}

    .. .etc

    }

    and in the child swf just got it dispatches the event your listener expects when it must be unloaded.

    dispatchEvent (new Event ("unloadMe"));

  • 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

  • run the error when go to the "home" button after loading external swf

    I work to develop an Android app to learn Arabic, it's very simple.

    to explain the alphabet, I create and load files SWF external, first and second Chargers work well (loading and when click the buttons there is not any question)

    but the third charger charge well also, but the problem when I test project, I make me run error when press home.

    (it does not occur when you load other chargers)

    Here are the sisters Project.rar Android - Google Drive files

    Thank you

    the problem is in the way that you use to add the listeners to events for the buttons, you add a listener for them different click events each keyframe, so you need to remove the headphones before you leave for another frame.

  • TextBox displaying text xml in the file work but now when loaded into another SWF

    Hi all

    I have uploaded a gallery of xml (as2) that we needed one for an old as2 file. Now I use especially as3, but thought that I only needed to tweak would no probs. Of course, it rarely works that way. The problem, it is loaded from the XML text is displayed with the corresponding picture. It works fine in the file. When I load the SWF in another SWF however, everything works EXCEPT the text does not at all appear? Whoever made the Gallery used "device fonts" in the text box, I don't know if this has anything to do with it. I tried to change the dynamics and embed text box, but still nothing.

    It seems the essential line-

    _root.descmc.DESC.htmlText = XMLdaten [number];

    I also tried

    _root.descmc.DESC.htmlText = XMLdaten [number] .firstChild;

    It locates the correct when tested XML so it's to find correct.

    Any help would be appreciated.

    Thank you

    The problem is perhaps in the use of the "_root", you probably need to set _lockroot = true; in the swf file loaded, otherwise the _root is the loading swf, not the loaded file.

  • V20.0.0.267 screen white when loading swf

    Loading our .swf with the last update of the activeX flash and then a blank white screen is displayed instead of the movie.
    Right-click on this space shows: "Movie not loaded" grayed out, and 'on Adobe Flash Player 20.0.0.267 '.

    The user cannot interact more with the framework and this prevents our full service program.

    Please respond with a workaround or difficulty of any emergency.

    Project1.jpg

    Hello

    Please update your Flash Player at 20.0.0.270.

    https://get.Adobe.com/flashplayer/

    The problem is resolved.

    Thank you

  • Stop loading of swf is still ongoing

    Hi all

    I have three buttons (_a, _b _c) which uses a similar instance of class contentSWF.as to load a SWF (content1... SWF, content2... SWF, content3... (SWF). using loader class now when I press the first button in the contentSWF.as the following code trigers.

    contentSWF.as

    private var swfLoader:Loader


    public class contentSWF (path) {}

    swfLoader = new Loader();

    swfLoader.load (new URLRequest (path));

    swfLoader.contentLoaderInfo.addEventListener (Event.COMPLETE, swfLoaded);

    }

    private void swfLoaded(e:Event) {}

    addChild()

    }

    Now when the content1.swf is still loading I press the second button. both sovereign wealth funds begin to play what is the issue.

    I have a contentSWF class that loads a SWF (content.swf) using the loader class, but at the time main line i hae another button

    If this class is used by the three different items separately, that would explain why you get each playing separately.  You're essentially left with 3 different Chargers.

    I don't know what you expect from this line: addChild() in your swfLoaded function, but it is not likely to do anything.

  • How to call a function of child swf

    Hello

    Here is that a parent SWF load a child swf file and there is a button/movieclip in child swf for example childBtn_mc, I now want whener I click on this childbtn_mc in parent SWF (like child swf is loaded into a parent swf file) thanks to a function in the parent swf.

    for ex.

    child AS SWF:

    childBtn_mc.onRelease = childBtnClicked;

    function childBtnClicked() {}

    trace ("call of the child");

    }

    SWF parent AS:

    loadMovie ("child.swf");

    chilBtn_mc. onRelease = childBtnClickedUsingParent;

    function childBtnClickedUsingParent() {}

    trace ("parent call");

    }

    ::::::::::::

    After compling the file when I click on childBtn_mc, trace = > call of the child

    and I want no trace of "the call of the parent.

    Help, please.

    Thank you.

    its DONE... Thanks kglad

    parent swf AS:

    _root.createEmptyMovieClip("page2MC",2);

    loadMovie ("test2.swf", "page2MC");

    page2MC.greenbtn.onRelease = parentFunction;

    function parentFunction() {}

    trace ("parent of child movieclip function call");

    }

    :::::::::::

    in children such AS:

    greenbtn.onRelease = _parent.parentFunction;

    Thank you.

  • Loading the SWF in the AIR for iOS

    Hello

    I'm working on a project in the AIR for iOS.  It's great that we, flash developers are now able to compile our code actionscript for iOS.

    The project that I am working on is divided into different SWF files.  There is a main SWF file that loads the others if necessary.

    Now I can't get a working swf file loading.  The only thing I see is the background of the child being displayed, but then the program freezes and no child actionscript code is exectuted.

    Children SWFs are loaded with a simple charger:

    var loader: Loader = new Loader();

    childLayer.addChild (loader);

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

    loader.load (url);

    When I post the main swf file I include children swf files in the package.

    Is it really possible to use several swf in your iOS projects?
    And what are the limits for this?

    Thank you.

    greeting,

    Bert

    Yes, it is possible to include any swf in your main application, but your external swf should not contain action script code. Just you can have graphics, symbols, textfield etc on the timeline, but with no timeline script.

Maybe you are looking for

  • MacBook retina cannot find the USB hard drive when it is plugged again

    Hello world I have a MacBook retina 2015 computers and a hard drive WD elements USB3 that I use as a Time Machine backup when they travel. The drive is plugged into the USB - C through one of the Apple dongles and when I first start the computer, the

  • I deleted the toolbar search box/engine. How can I restore it?

    I have a right-click on the search box and probably clicked on the choice of menu from the top, hidden behind a bubble. I liked having a separate search box.

  • Impossible to get Samsung SSD EVO to work on the Satellite L50-A0424

    I tried these last days to set up an EVO Samsung 500 GB SDD on my laptop, a Toshiba L50-A0424 and I can only call an exercise in frustration. First of all, the Samsung comes packed with a SATA cable USB cloning of the original hard drive is a pain. A

  • Photo folders

    How do I copy/import my image files existing (I have now on the desktop) in PHOTOS? I don't want to lose the folders the images are currently. I know how to create folders in the PHOTOS, but I have a lot of images to transfer from my old hard drive.

  • counter stuck at zero

    Hello I use LabVIEW 2014 on 64-bit Windows to acquire data of moving a digital coder as follows: linear encoder Renishaw--> NOR 9411 digital in--> cDAQ - 9174--> Windows machine. I have a VI that records moving to 5000 Hz. He was works well for weeks