Detect if a swf file is loaded into another swf

Is there a way for my flex swf to detect if it has been loaded into another swf parent or if it is running standalone?

Any help appreciated.

Marcus

SystemManager.isTopLevel and isTopLevelRoot

Tags: Flex

Similar Questions

  • getURL works not when the swf is loaded into another swf

    Okay, I need help with something relatively simple which for some reason that I was not able to find information about everything?

    I hope that this will be something easy to correct.

    I basically the following:

    • my main movie "Home.swf".
    • another film "Sub.swf".

      I loaded "Sub.swf" in "Home.swf" via an empty movieclip.

      In "Sub.swf", I have some links that, when clicked call getURL and open an HTML page in the browser.

      But for some reason any the getURL does not work and I think its because the getURL is called from a movie loaded into "Home.swf".

      I tried to change the actionscript code for:

      _root.getURL('/MyPage.html');
      _parent.getURL('/MyPage.html');

      but neither (_root / _parent) seems to work?

      Need some help here please.

      Thank you very much.

      Kind regards
      M.

    It is not the getURL that's the problem. It's your _level0.imgMC.MC5 that is the problem.

    in Sub.fla, replace _root _level0 and add the code below your delivery code:

  • How can I call functions of a SWF file loaded into another swf?

    Hello

    Please excuse my ignorance, I am very new to actionscript and flash.

    I have 2 Fund sovereigns - a.swf and b.swf.

    I load b.swf in a.swf with the following code:

    var swfLoader:MovieClipLoader = new MovieClipLoader();
    swfLoader.loadClip("b.swf", container_mc);
    

    Now in b.swf, I have a function as follows:

    public function sendData(){
      trace("I ran the function!");
    }
    

    So I did a lot of reading, from what I can tell, I should be able to perform the function of sendData() from code in a.swf, by typing:

    container_mc.sendData();
    

    but it's not working. What I am doing wrong?

    Thanks in advance,

    Adam

    container_mc. SendData();

    will work AFTER THAT b.swf is initialized.  That is to say, use a listener to detect that.

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

  • I have a problem in direct charge of path where the default values are not met when using the CSV file to load into the database while his is filled everything in plain insert queries

    -The header of the control file, I added a load direct method(append mode)

    OPTIONS(direct=true,Parallel=true,skip_index_maintenance=true,skip_unusable_indexes=true)

    DATA RELATING TO SUNK COSTS

    ADD

    INSERT INTO TEST_TBL

    (

    col1,

    ...

    Col n-2

    );

    Try to use the classic path instead.  With the direct path, many constraints and triggers, and others are disabled.  Please see the next section of the online documentation.

    https://docs.Oracle.com/database/121/Sutil/GUID-973925DA-8F86-49C1-A707-4564DC3B57AE.htm#SUTIL1330

  • where are the printer presets stored? How to find the .prst files to load into InDesign?

    I use InDesign CC 2015 to a new intall of creative cloud on a new hard drive after the old one crashed. I always have access to my files on the old HARD drive and you have copied most of my files on the new drive. When I go to print in InDesign, the program seems to know what settings of the printer, I used on files that I created, but I don't see no presets. When I go to load the application InDesign presets where I should look to load the files .prst and that's what I want to know. They are on the local drive? If yes where? They are on the cloud in my Adobe account where I have my cloud files? I will keep searching my computer, but if someone knows the answer, please help.

    Printer presets are stored in the InDesign Defaults, a part of the whole of the preferences file. You should open the ID on the old system and then click on the dialog box define where you can select them and click on save, and then on the new system, you can load the game that you just saved.

  • cannot locate any photo on MAC files to load into LIGHTROOM and how to load?

    How can I find ALL my photos on my MAC and download in Adobe Lightroom?

    You can use your operating system to search for all JPG and TIF all RAW, etc.

    Then import you them into Lightroom. Once you have located the files (as explained in the previous paragraph), just select the files in your operating system and drag them into Lightroom. More details here: using Adobe Photoshop Lightroom | Import photos from a folder on a hard disk (choose 'Add' at the top of the import dialog box if you want to keep the pictures in their current location, and then click the import button it)

    You can see a few tutorial videos on Lightroom at to get started with Adobe Photoshop Lightroom 5 | Adobe TV

  • PSDX files not load into Photoshop even with the plugin

    I installed the Plugins of App Touch since creative Cloud applications, but when I try to open it in Photoshop CS6 I just get a Windows error "could not complete your request because it is not the right kind of document.

    Is there another way to load?

    If PSDX is not listed under the file types that might explain why you can not open it. I'll do some checking more and get access to Windows 8 and test me, but it will not be until tomorrow. You are using version 32 or 64-bit of Windows 8?

    As a temporary workaround, you should be able to convert a PSDX PSD file through creative cloud, he just choose the option to download and then choose PSD as file type.

  • My lightroom 3 is updated. However, I bought a Canon 7 d Mark II and shot the FIRST... Now cannot get the CR2 files to load into lightroom... Help! PLEASE, I BEG YOU! Thank you!

    I recently bought a new Canon 7 d Mark II camera. I shoot mainly in RAW... However, I am owner of Lightroom 3... It is current version 3.6... No matter what... And it does not recognize the files... said 7DMIIs that they are "unrecognizable or are damaged. Can I covert them to JPEG using a converter of files... but this is a wedding I deal with in raw... what Miss me? I even downloaded the new free trial version of lightroom to try for 30 days... still nothing... Help, please!

    Suggest you convert CR2 raw DNG (Adobe) or purchase LR6. You can get the latest DNG converter for Windows or Mac 9.1 from following link. DNG files will then work with your current software (keep your originals as backups and for use in the software of the camera factory)

    To download click here-DNG Converter 9.1

    You can convert an entire folder of images raw with a single click. See this quick video tutorial:

    You Tube click here for the DNG Converter tutorial

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

  • Question of embedding fonts when SWF is loaded into the charger

    Hello.

    I ran into a problem of the incorporation of police where all the text fields with embedded police disappear when the SWF file is loaded as a child into a parent SWF. When the SWF file is read directly as stand-alone or inside a container of page HTML, text fields display perfectly with embedded fonts. Just not if the SWF is loaded into another SWF. It's basically the way I joined the police:

    [Inside the document class]

    [Embed (source="/Library/Fonts/Arial.ttf", fontName = "FontVerdana", mimeType ="application/x-font-truetype")]

    public static FontVerdana: Class const;

    var theFont * = new FontVerdana();

    var myText:TextField = new TextField();

    var fmt:TextFormat = new TextFormat();

    FMT.font = theFont;

    myText.embedFonts = true;

    myText.setTextFormat (fmt);

    Incidentally, I either work on a Mac using Flex 3.5. Anyone encountered this problem? What can be done to fix this?

    See you soon,.

    Harry

    Check out my blog on embedded fonts

    --

    Alex Harui

    Flex SDK Team

    Adobe System, Inc..

    http://blogs.Adobe.com/aharui

  • How to force the latest version of the SWF file to load in the web page

    How can I make sure that the latest version of a SWF is loaded into a web page?
    Once the user has loaded the web page, the SWF file is loaded into the browser's cache, but when I refresh the web page, I would be the last SWF file to load and not already in the cache.
    Feasible?

    Try this:

    http://www.quip.net/blog/2006/Flash/be-in-charge-Cacheing

  • To refer to an object on board in an onclick = "" in a file loaded into an iFrame in the animation .html "

    HI, I'm trying to understand the edge predetermined by stumble my way through the attempts of coding reference. I hit a wall...

    How can I refer to an object and a global function in my animation Board an onclick = "" located in a .html file loaded into an iFrame created in animation master/parent edge. " Here's what I have...

    My main index.html is an animation on board. A single object < div > is a box created within the Edge. I've added an iFrame with the benefit code:

    SYM. $("MenuPanelScreen") .html ("< iframe src ="list_images_cemetery.html "width ="267"height =" 670 "sandbox =" allow-same-origin allow scripts allow-top-navigation"> < / iframe > ');

    This .html file that loads into the iframe in the animation contains thumbnails in < a > tags and contain onclick = "" instructions that must call a function in the file Edge. "

    Finally, I want to as statements read something like... ( onclick = "changePic ('Dragon.jpg ', 'le Dragon)", "Holy and worm") "

    However, I had no idea how reference to the changePic() function in the entertainment on board. So, just to understand how to make reference to the animation of parent of a html element in an iFrame, I change the onclick = "" statements to... "

    < a onclick = "alert ("trying to hide the nameplate"); SYM.$('NamePlate_sym').hide (); " > < img src =" gallery/TheyGaveUpTheirDead.jpg' width = '80' alt = "Angel and worm" / > < / a > "

    First of all, I wanted to see if I could hide a symbol of edge or a div element / child html code. I tried the following...

    OnClick = "alert ('try to hide the plate'); SYM. $('NamePlate_sym',_window.parent.document).hide (); »

    I tried a few other variations that I won't bore you with. Can someone help me with the proper reference to achieve an element of edge?

    Moreover, I ultimately want the onclick = "" declaration to reference a global function on attached to the step edge in the event compositionReady of the scene. " The function is...

    window.changePic = function (myFileCurr, myLabelCurr, myDescriptionCurr) {}

    Alert ("in changePick");

    document.getElementById("myImage").src = "Gallery /" + myFileCurr;

    document.getElementById("myImageLabel").innerHTML = myLabelCurr;

    document.getElementById("myImageDescr").innerHTML = myDescriptionCurr;

    }

    I hope someone can point me in the right direction. Please forgive my ignorance. I'm just to come back in coding and learn the intricacies of Jscript and jQuery. Thank you!

    Well, after nearly sawing my head with a Pocket comb, I tried this...

    COMP. $("Rectangle").html ("test");

    and

    window.parent. changePic(); to call the global function

    At the same time, it worked.

    Thanks, Elaine. Your example helped!

  • video SEO is not even when SWF is loaded into SWF

    Copy the following code is based on the _droptarget info in the Actionscript 2.0 language reference. It works fine by itself but the breaks when the SWF is loaded into another SWF. Notice that I use the _lockroot property to keep the _root of the loaded clip.

    I've isolated the problem to the "if" condition The player does not seem to recognize the equivalence of the names. But when you debug with Trace, the names are the same.

    The goal is to have the drag snap object to the target object when the target but snap to its origin, if not on target. It works in 6, but the drag object snaps back to its original 7 - as if he had not fallen on the target object.

    A solution and the explanation is in the attached code:

  • How can I list the main on a SWF timeline when it was loaded in another?

    I have a swf with functions of animation custon using actionscript 3. I am referring to the main timeline with Movieclip (root) and it works fine.

    However, the swf will be loaded into another (a custom player), and when this happends, everything stops working.

    I think it's because the Movieclip (root) now reference the swf loader and not the loads more, but I can't find any information on how to fix this.

    The key would be to break with the use of references to the root.  Whether or not this will be an easy task for you in this case depends on saturated how your code is with these references.  The shortest route for you may be to replace the references to the root by parent references instead.

    It is a reason say that your code should be limited to an image in the scenario primary (in fact they are more likely to say that it should be in a class of document - separate fla files/timeline).  If you have all the code forward in the file, and no code search backward, what ios and made a reference to root, so you don't have to worry about how it is loading in another file.

Maybe you are looking for