Security error: file (call a SWF from another directory)

I have a program that loads another swf that resides in a different directory.  In this 2nd swf, I need to create a new file object by calling new File (filename);  This generates a security error.  If the two programs are in the same directory, it works fine.

Is there any solutions to this?

Thank you!

If the loaded SWF file is outside the application directory, it is deposited in a different security sandbox and will not have access to the filesystem API - where the security error. (This works when the two rulers are in the same directory, because the two sovereigns are then in the application security sandbox). Note that loading a SWF in a subdirectory of the application should work without a security error.

The best way to solve the problem is to use the property of the parentSandboxBridge object LoaderInfo associated with the loaded SWF file. You can make a function for the creation and writing of data to the new file to the loaded SWF file. This technique allows you to control exactly what functions the loaded SWF has access to.

You can also "import" a SWF no application in the field of application security by loading with Loader.loadBytes () method when setting the property allowCodeImport of the LoaderContext object true past. Don't forget to consider the implications in this way, however, given that this SWF essentially runs with the same privileges and permissions as your main application - and can access all the information stored by the application in memory or on 'drive '. As you load a SWF in this way is either remotely or in a location of system files that are accessible by other applications more often, the possibility that the SWF file has been modified by a malicious entity is a real threat that you should take very seriously.

Tags: Adobe AIR

Similar Questions

  • Flash as2 cross subject to access the SWF from another server domain

    I have question cross-domain, how do I access the .swf from another swf file without using System.Security.allowDomain() in the swf file, which we are called.

    I use 2 domains and I have 2 files swf is a.com (a.swf) and another is of bcom (b.swf) I want to access the file the a.swf b.swf frames, if I use the system.Security.allowDomain() in b.swf file I can access executives. But without using this way I can access the file from another domain.

    Because I have a risk to change the file b.swf so I vant to go without changing the file b.swf is any other wey to access frames of the file the file a.swf b.swf. Please someone help me solve this problem.

    use a local executable (such as php) to load the b.swf and send it back to a.swf.  for example:

    loadSWF.php:

    <>

    $fh = fopen ("www.b.com/b.swf", "r");

    Header ("Content-type: application/x-shockwave-flash");

    fpassthru ($FH);

    ?>

    a.fla:

    var target_mc:MovieClip=this.createEmptyMovieClip("target_mc",this.getNextHighestDepth());

    target_mc.loadMovie ("loadSWF.php");

  • Call the method from another application

    Then. That is my question. Is it possible to call a method from another application, so I can get some data from this app?

    I know that I could also do this with persistent store, but I would like to do it this way.

    Thank you. I'll try with world events and TIME store.

  • How could call a report from another report?

    Dear developers,

    How could call a report from another report?

    is this possible? and what is the call statement?

    Note: I use the 6i report



    Thanks in advance,


    Bil

    Hello

    It seems that you 'open' a quote before: orderby.
    You must "close" this quote after: orderby

    SRW.run_report ("report = SDCRVRF106 Cl_NO ='|"'|: CLIENT_no | "") ' || ' d1='||'''' || :D1 ||'''' ||' d2='||''''||:D 2 ||'' ' |' orderby =' | '''|| : o rderby | " ') ;

    concerning

  • How to call the SWF in another swf file using xml

    HII,

    I am facing a problem to call a SWF via xml when the loaded xml file it asks another swf file that includes a new xml file. now, if I call this nested swf calling without xml it works but in case of xml, it does not show the result. I confused Mr. how to nested xml file call done in as2/as3. I need some logic. Thanks in advance

    This is the forum of AS3 and your assignment involves AS2 code.  You should repost in the AS2 forum...

    http://forums.Adobe.com/community/Flash/flash_actionscript

    Aside from that, your problem may lie in the following lines...

    _root.createEmptyMovieClip ("sub_container1", 1);
    loadMovie (. attributes.url sub_SWFPath [1], "sub_container1");

    You create the new movieclip, sub_container1, in the _root, but you do not assign the loadMovie to load in the same movieclip (unless you have a _lockroot = true in your sub - swf).  In all cases, you should repost in the AS2 forum to continue troubleshooting.

  • Microsoft Visual C++ Runtime Library. Run-time error. Only, I get this message when I try to download a form or file usually the pdf from another site.

    This application has requested the execution to terminate in an unusual way. For more information, contact the application support team.  This message comes on only when I try to download information from another site for example a leaflet or instructions from another site site usually in pdf format. Please can someone help?  Not too techinical please!

     

    Hello

    1. what web browser do you use?

    2 have had any changes made to the computer before the show?

    If you use Internet Explorer, please follow the steps in the link.

    http://support.Microsoft.com/kb/822521

  • How to call a dll from another dll functions

    Hi, can someone please tell me some examples or instructions on how you go about calling functions from a dll from another dll including the IUR. The two DLLs were created with labwindows cvi.

    Thank you!

    Hi Sinnas,

    You mention that you use a UIR.  A DLL does not have a file UIR as part of it.

    DLL1

    Instead, when you build the DLL first, we'll call it DLL1, you create a header or the files that contain functions that you want to the client code to call.  When you build DLL1, you must export the file DLL1 function for his client to call code header.  Whatever the calling code is (a GUI or another DLL), you must include in the exported DLL1 project headers AND DLL1 .lib file generated when you generate it.

    DLL2

    DLL2 will contain in its project, the header file exported for DLL1, DLL1 .lib file - that gives it the feature in DLL1.  The code can then call any desired DLL1, but as DLL1, you should now have a header file that exports the functions of DLL2 desired HIS client code to call.  When you build DLL2, you create a .lib for THAT DLL file to include in the code of the final customer.

    GUI

    The final customer code will be a few GUI that you create to call DLL2 functions will have the UIR upper layer file.  It will include the exported DLL2 header file and the file .lib DLL2 in his project.  It can then call any function of DLL2.  It is the most clean way to have 2 dll working together.

    NOTE: You can create a GUI to test the lower level DLL1 functions before placing DLL2 in the system.  In fact, it's a good idea to do it - you want to make sure your lower level DLL1 code works properly before construction above it.

    Simple diagram

    Client code (calls to functions of the DLL2 header files) exported

    --------------------------------------------------------------------------

    DLL2 (DLL1 function calls exported in header files)

    --------------------------------------------------------------------------

    DLL1<--------------------  you="" can="" also="" create="" a="" gui="" that="" only="" calls="" dll1="" exported="" header="" files="" to="" test="" out="">

    A suggestion... I create my dll in debug mode and use them to test my code.  But I also build as static libraries.  When I do the final version of the system, I use static libraries.  They are built with the final executable and don't require additional files to install as do the dll.  When you install your system with DLLs, you must include all THE dll and they must be installed in the folder Windows/System32 of the target computer.

    I hope this helps...

    Judy

  • All files can be deleted from the directory of research?

    I have Windows Vista Home Basic, I. E. 9, 32-bit, Service Pack 2, Inspiron 531, RAM 1.00 GB.

    Can all files be deleted safetly from the following research directory?
    Everywhere (this file has more results that will fit in this view)
    Indexed locations (too many to count)
    Recent documents (no need)
    Recently changed (no need)

    Files can be deleted or ALL?  The recent recent email music, photos & videos, recent and shared by me are empty. Do not use, do not intend to do.

    Hello

    Only the shortcuts can be deleted without losing any data.

    Research directories are indexes for these files.  If you delete the files in the directories of research, you will remove the file from its location.

  • Call a project from another file

    Hello

    I have 2 projects, one as a BB app and the other as a library. The main project of BB Application uses some of the classes in the library project. It works fine if I import the library jar in my BB application project. But now I want to do the vice cersa, I have a folder of Images in the project of BB I want to access the library project. Is there a way I can create a main project within the library reference?

    Appreciate any help...

    Not a library cannot depend on an application

  • How to access files in a computer from another computer.

    Original title: Simple Network help please

    All I want to do is plug my 2 computers on Win 7 default Workgroup through my modem router ADSL.  One, my laptop is running Win 7 Premium and connect wirelessly, the Bureau uses an Ethernet, Win 7 Professional. The wireless has only a single HARD C: drive and the desktop PC has 2 hard drives, a partitioned in C:, D: and the other E:. I connect to computers by using the same username/password. I want to be able to see/modify/copy any file from one PC to another, but it seems so difficult with Win 7.

    Homegroup would be perfect if it allow you to use more public folders. Oh, I forgot, I have a printer connected to my desktop PC I want to print over the network. Please can someone help, because he drives me crazy.

    Hi Iain_L,

    Thanks for posting your query in Microsoft Community.

    You want access to files from one PC to another PC, check out these links and check that it helps.

    Homegroup from start to finish:
    http://Windows.Microsoft.com/en-in/Windows/HomeGroup-help#HomeGroup-start-to-finish=Windows-7&V1H=win8tab1&V2H=win7tab7

     
     
     
    File and printer sharing: frequently asked questions:

    http://Windows.Microsoft.com/en-in/Windows7/file-and-printer-sharing-frequently-asked-questions

    Using ICS (Internet Connection Sharing):

    http://Windows.Microsoft.com/en-in/Windows7/using-ICS-Internet-connection-sharing

    Connect to another computer using Remote Desktop connection:

    http://Windows.Microsoft.com/is-is/Windows7/connect-to-another-computer-using-Remote-Desktop-connection

    Hope it will be useful. If you still have questions, answer us with the exact error message when this problem occurs, and we will be happy to help you.

  • Is it possible to "script" a swf from another flash object.

    I would like to be able to place or load another flash file in my main flash file.  The flash of the child file is written by a third party, and I don't want to rewrite / recompile all parts of its source code.  So ideally, I would like to be able to call something like:

    child_mc.genericFlashSpirte.x += 15;

    child_mc.genericFlashSpirte.y = 30;

    etc...

    flash file inside the code of the parent company.

    Is this possible.  I guess, that once I have incorporate the child flash file, I should be able to start and stop playing, but I want to do more, then this.

    You can load external swf with the Loader class files.  You can target the loaded file after loading is finished and he created himself (after the INIT event) by targeting the event.target.content.

  • Simple enough, but calling one method from another class

    Hi all
    I know it's pretty simple, even though I do not see where I am going wrong for some reason any. Basically, I have a class that extends JPanel but when I try to call one of its methods in my main class I get an error. The code (I hope) is:

    Main.Java
    import java.awt.BorderLayout;
    // ...
    import javax.swing.UIManager;
    
    public class Main extends JFrame implements ActionListener {
    
         JFrame frame;
         public static JPanel statusBar;
    
         public Main() {
    
              // ...
    
              // Add a status bar
              statusBar = new StatusBar();
              mainPanel.add( statusBar, BorderLayout.SOUTH );
    
              setContentPane( mainPanel );
              // ...
         }
    
         // ...
    
         public static void setStatusBarText( String s ) {
              statusBar.setStatusText("Test");
         }
    
         // ...
    }
    StatusBar.java
    import java.awt.Color;
    // ...
    import javax.swing.SwingConstants;
    
    public class StatusBar extends JPanel {
    
         private int barWidth;
         private static JLabel status;
    
         public StatusBar() {
              super();
              //barWidth = Main.getProgramWidth();
              //setPreferredSize( new Dimension(barWidth,22) );
              setLayout( new FlowLayout( FlowLayout.LEADING ) );
              setBorder( BorderFactory.createMatteBorder(1, 0, 0, 0, new Color(160,160,160) ) );
    
              status = new JLabel("Test", SwingConstants.LEFT);
              //status.setVerticalAlignment( SwingConstants.CENTER );
              add( status );
         }
    
         protected void setStatusText( String s ) {
              status.setText( s );
              revalidate();
         }
    }
    The "statusBar.setStatusText ("Test")"; call in the main class file does not work and I get the error:

    >
    cannot find symbol
    symbol: setStatusText (java.lang.String) method
    Location: class javax.swing.JPanel
    statusBar.setStatusText ("Test");
    >

    Any ideas what I am doing wrong? I created an instance of the class called status bar StatusBar, can I use it to call the setStatusText() method (via statusBar.setStatusText ()) I thought everything is OK, then it does not work? Even if there is an easier way to do what I want to achieve (i.e. to update a JLabel since the 'central' main class file instead of setting the JLabel static and have all classes call him directly), I'd be glad to know where I am going wrong here nevertheless.

    Thank you very much
    Tristan
         public static JPanel statusBar;
    
         public static void setStatusBarText( String s ) {
              statusBar.setStatusText("Test");
         }
    

    >
    cannot find symbol
    symbol: setStatusText (java.lang.String) method
    Location: class javax.swing.JPanel
    statusBar.setStatusText ("Test");
    >

    The type of variable statusBar is JPanel. That's all the compiler takes into account. It is not relevant that at a certain point in the program, the type of the object pointed to by this variable is a subclass of JPanel (because at another time, it might be an instance of another subclass or JPanel itself.

  • Error - file has been updated by another user. Ask to see change

    Hello

    If I save a record in forms (Custom) after this attempt to change or add content in the fields, I get the error below.
    FRM-40654: record has been updated by another user. Re-query to see change.

    Please provide the inputs.
    (Form 10g Version, using this form in Oracle Application R12)

    Thank you
    Prasanna

    Prasanna,
    Some of the typical causes of this error are:
    1 database column is of type CHAR (?) and forms is of type VARCHAR2 (?). As CHAR() pads type, the length of the Forms data will be cut padded spaces of the value of data when the column is queried in the form. The solution is to update the VARCHAR2 database column so that the data are not completed.
    2 database trigger on the table changes the data in the INS, the UPD treatment or if you have a Post-Ins/Upd trigger that changes the data in the table. The solution is to clear the block and update or change your processing logic to prevent editing the table.
    3. after query trigger on the data block changes something in the base table. The solution is to eliminate the process after query that updates your block element.

    Here are some of the most common causes of this error.

    Hope this helps,
    Craig B-)

    If someone useful or appropriate, please mark accordingly.

  • File too big .swf from a small .fla file

    Hello!

    I am a user of Flash CS3 with AS2. If I export a file, .fla, sometimes because of Flash CS3 a little .fla to .swf file drop a big .swf file. The .fla file have only 58 kB and the .swf file has 540 kB! Why? I ' ts only a simple regular shape with four textfields and I have no photo or other large files into it! Before Flash CS3, I was a user of Flash MX2004 and I don't ever have the same problem. This problem will occur if the .fla project has some of entry or dynamic textfields. Can I help me someone?

    Thank you for your response, WISION

    The solution is: in the properties of the textfield object must be set to "use the device font. I do not understand why, but the exported .swf file has 540 kB has decreased to 6 kB.

    WISION

  • How to call a function from another script.

    Hallo

    TypeError: Error #1009: cannot access a property or method of a null object reference.
    next / NEXT)

    and here is my script.

    Main.As

    package
    {
    import flash.display.MovieClip;
    import flash.display.Sprite;
    import flash.display.StageAlign;
    import flash.display.StageScaleMode;

    import flash.events.Event;
    import flash.events.EventDispatcher;
    import flash.events.MouseEvent;
    import flash.net.URLRequest;
    import flash.net.URLLoader;


    SerializableAttribute public class Main extends MovieClip
    {
    public void Main()
    {
    trace ("Startup");
    }

    public void PRINT (): void
    {

    trace ('work');

    }
    }
    }


    Next.As

    package
    {
    import flash.display.MovieClip;
    import flash.display.Sprite;
    import flash.display.StageAlign;
    import flash.display.StageScaleMode;

    import flash.events.Event;
    import flash.events.EventDispatcher;
    import flash.events.MouseEvent;
    import flash.net.URLRequest;
    import flash.net.URLLoader;


    SerializableAttribute public class then extends MovieClip
    {

    private var _main:Main;

    public function Next()
    {
    NEXT_INT();
    }


    private void NEXT_INT (): void
    {

    mc.buttonMode = true;
    mc.addEventListener (MouseEvent.MOUSE_DOWN, NEXT_PRINT, false, 0, true);
    }

    private void NEXT_PRINT(e:MouseEvent):void
    {
    _main. PRINT();
    }

    }

    }

    http://noLabel.pl/QuickTest.rar

    http://noLabel.pl/QuickTest.zip

    Try this. I can't compile your application in case of location (names of variables with national characters). Here you have a quick example: we have two symbols in the library buttonMC and playerMC related to clssses Player and button. There handleClick (click event handler) method in the Button class, who do the work for you.

    concerning

    JK

Maybe you are looking for