Creating external files (.txt, .json, etc)

Hello everyone,
I'm currently trying to find out how to create external files from a SWF/exe/app file created in Flash. Essentially I'm building a program to create templates for levels in a game. The SWF will be run locally (e.g. not online) and will allow the user to add/remove objects to a level of their design. They then need to be able to save the level template (ideally I need to be able to save as a JSON* file, but I'm sure I could get away with just a simple txt file) somewhere on their computer. These templates will them be imported by the game itself (not written in Flash, hence why I need to save the data as a json or txt file), which will then re-create the levels from the data contained in the save file.
I had assumed this would be something that was really simple to do, but I cannot seem to find any tutorials or information on how to create external files. I can find plenty on reading from existing external files, but nothing about actually writing a new file entirely. I have read a few people complaining that non-local Flash SWFs cannot access the user's hard drive for security reasons, but cannot find any information on local SWFs.
If anyone could tell me even roughly what I'm looking for, it would be greatly appreciated. I'm a bit stuck just now haha
*I have downloaded the corelib files which allow me to work with JSON files

Flash is not able to write any type of text file on user system.
U have to use air or zinc to intract with file system.
Yes u can use shared objects also. Which stores value to user computer and browser stores cookies on user system

Similar Messages

  • How can I load external file .txt in After Effects CC 2014.0 Release / Mavericks OS X 10.9.4 (13E28)?

    ello everybody.
    Someone can help me to load a external file .txt in After Effects CC 2014.0 Release / Mavericks OS X 10.9.4 (13E28)?
    I tried the code bellow, but doesn't work.
    try{
    myPath = "~/Desktop/source.txt";
    $.evalFile(myPath);
    eval(thisComp.name)[0];
    }catch(err){
    "MISSING";
    The source.txt file have the texts bellow:
    var comp1 = ["Title”, “Subtitle”, “Description”];
    var comp2 = ["Text 0", "Text 1", "Text 2"];
    var comp3 = ["Text 0", "Text 1", "Text 2"];
    Thanks.

    This is the text file (with the modified first line) that I used:
    var comp1 = ["Title", "Subtitle", "Description"];
    var comp2 = ["Text 0", "Text 1", "Text 2"];
    var comp3 = ["Text 0", "Text 1", "Text 2"];
    Dan
    BTW - I did test it on AE CC 2014

  • Export command does not create output file (PDF/WORD etc format)  file

    I am using Crystal Report 8.5 and studio .net 2002.  I have crystal report 8.5 as well as Crystal report XI
    installed on machine.
    I have used Crystal Report Engine 9.1.3300 as reference in asp.net application.
    Some of the crystal reports get exported to file (PDF/WORD etc) properly in the virtual directory.
    However, for some reports export file (any format) PDF file does not get created.
    Please help urgently.
    regards,
    Anita

    Anita please download Service Pack 1 for CR 9.1 and see if that resolves the issue. SP 1 is here:
    https://smpdl.sap-ag.de/~sapidp/012002523100009301312009E/crnet11win_en.zip
    Ludek

  • Create external file ........

    my system config: windows 7 and Oracle sql developer 11g.......
    I can not create any kind of external file ........
    pls help me with an example ,with below complete steps
    1.create directory
    2.grant directory
    3.create with external file location

    923746 wrote:
    my system config: windows 7 and Oracle sql developer 11g.......Are you describing the configuration of the client machine? The server machine? Or are you running both the client and the database server on one machine?
    1.create directory To create a directory object in Oracle
    CREATE DIRECTORY directory_name
        AS '<<path on server to a directory that exists on the server>>'That assumes that the path you specify in the DDL already exists on the database server
    2.grant directory
    GRANT read ON directory_name TO user_name;
    GRANT write ON directory_name TO user_name;
    3.create with external file location
    DECLARE
      l_file utl_file.file_type;
    BEGIN
      l_file := utl_file.fopen( directory_name, file_name, 'w', 32767 );
      utl_file.put_line( l_file, 'Some text' );
      utl_file.fclose( l_file );
    END;Justin

  • Creating a file in the /etc/folder?

    To install MySQL I'm following the instructions on http://stringfoo.com/2007/11/05/serversetup_onleopard/
    Step 8 is to write a four-line file and save it in the directory /etc/. BBEdit has a menu item for "Open Hidden" that can open files in that directory, but I'm stumped how to save a new file there. I'm logged in as a administrator. Dreamweaver can open files from that directory, but not save a new file there. The terminal can open files in that directory and I see "mkdir" for creating a directory there but I don't see a command for making a file. I searched help files but couldn't find anything.

    Another easy way to save files into the "hidden" Unix folders that should work in most GUI applications...
    When you're in the standard save dialog press <Command><Shift>G (just like Finder's "Go -> Go to folder..." menu item). You'll get the same "Go to folder" dialog and can just type in "/etc" to get into that folder, then save your file.
    Steve

  • External file TXT (Prefs) in DCR?

    I seek for help for lingo programming...
    I make an external TXT file using set pref and get pref.
    It can be accessed normally by PROJECTOR.EXE
    The Text I made and save in the external TXT File can be
    showed in the projector.exe.
    I wanted to publish it to the web, so I compile the
    projector.exe to projector.DCR
    So there are 2 files the small DCR file and the HTML file.
    BUT when I open the HTML and showing the DCR inside,
    The external TXT file didn't shown up in the DCR. Justa BLANK
    text shown.
    Is there any suggestion for me? Plz help.

    read all about the dswmedia folder here:
    http://www.adobe.com/cfusion/search/index.cfm?loc=en_us&term=dswmedia+folder

  • Saving files(txt,pdf etc.) in database received from client

    Code:
    <!--- Sets the file source --->
    <cfset rfsfile = "#form.accepted_attachedfile1#">
    <cfset rfsid = "#form.rfsid#">
    <!--- Reads The Files Binary Data --->
    <cffile action="readBinary" file="#rfsfile#"
    variable="MyVariable">
    <cfset MyBLOB = toBase64(#MyVariable#)>
    <!--- Save the file in database --->
    <cfquery datasource="manpower" username="devegov"
    password="dev@egov" name="insertfile">
    insert into TBL_RFS_ATTACHEDFILES (RFS_BLOB)
    values (<cfqueryparam value="#MyBLOB#"
    cfsqltype="cf_sql_blob">)
    </cfquery>
    <cfoutput query="insertfile">
    successfull!!!!!!!!!!!!!!!!!!
    </cfoutput>
    <cflocation url="/rfs_backend/RFS_detail.cfm">
    The table is :
    create table TBL_RFS_ATTACHEDFILES (
    RFS_BLOBID INT generated by default as identity (increment by
    1,start with 1) not null,
    RFS_BLOBNAME VARCHAR (50),
    RFS_BLOB BLOB (500000),
    primary key (RFS_BLOBID));
    I am getting the following error in this code.........
    Error casting an object of type to an incompatible type.
    This usually indicates a programming error in Java, although it
    could also mean you have tried to use a foreign object in a
    different way than it was designed.
    The error occurred in
    C:\CFusionMX7\wwwroot\rfs_backend\RFS_SaveRFSDetails.cfm: line 22
    20 : <cfquery datasource="manpower" username="devegov"
    password="dev@egov" name="insertfile">
    21 : insert into TBL_RFS_ATTACHEDFILES (RFS_BLOB)
    22 : values (<cfqueryparam value="#MyBLOB#"
    cfsqltype="cf_sql_blob">)
    23 : </cfquery>
    24 : <cfoutput query="insertfile">
    Please try the following:
    * Check the ColdFusion documentation to verify that you are
    using the correct syntax.
    * Search the Knowledge Base to find a solution to your
    problem.
    Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
    rv:1.8.1) Gecko/20061010 Firefox/2.0
    Remote Address 127.0.0.1
    Referrer
    http://localhost:8500/rfs_backend/RFS_detail.cfm?rfsid=3008
    Date/Time 07-Dec-06 03:48 PM
    Stack Trace
    at
    cfRFS_SaveRFSDetails2ecfm555042871.runPage(C:\CFusionMX7\wwwroot\rfs_backend\RFS_SaveRFSD etails.cfm:22)
    java.lang.ClassCastException
    at
    coldfusion.sql.InParameter.setStatement(InParameter.java:49)

    There is an exclusive forum for forms - {forum:id=82}
    And please dont use the words like Urgent, ASAP in these forums.. That will kill the chance of getting replies to you..
    Edited by: jeneesh on May 16, 2013 2:45 PM

  • Export result of an execute_query to a file ( txt , EXCEL , etc..)

    i work with Forms6i, and i want to export the result of an execute_query to file with any extention.
    the execute_query is applicated to a block after pressing button Execute.
    thanks in advance

    Hi,
    check out TEXT_IO package on Forms' Help...it should be what you are looking for.
    Bye, Marco

  • Create file txt

    Hello,
    How I do to create a file txt with action script.
    Thanks

    you can't use actionscript alone. you'll need to use
    something else in addition to flash like some server-side code
    (php, perl etc).

  • JSON external file

    I'm having trouble with this script. can anyone help me? I thought JSON was built into edge. but after writing these lines of code it doesn't appear so....
    var imageArray = new Array();
    var currentImage = 0;
    var mySlidingImages = sym.getSymbol("ImageSlider");
    sym.$("PlaceHolderText").html("");
    $.getJSON("data/photos.json", function(data){
                   for(var i=0; i<data.length; i++){
                                  imageArray.push({"image":data[i].image,"title":data[i].title});
                   sym.$("PlaceHolderText").html(imageArray[currentImage].title);
    so when that didn't work I tried this:
    yepnope({
    nope:[
    'edge_includes/json2_min.js'
    complete: init
    //when yepnope has loaded everything execute init();
    function init (){
    //initialise your variables and Edge comp here
    var imageArray = new Array();
    var currentImage = 0;
    var mySlidingImages = sym.getSymbol("ImageSlider");
    sym.$("PlaceHolderText").html("");
    $.getJSON("data/photos.json", function(data){
              for(var i=0; i<data.length; i++){
                        imageArray.push({"image":data[i].image,"title":data[i].title});
              sym.$("PlaceHolderText").html(imageArray[currentImage].title);
    Basically what I'm trying to do is create a slider that will auto populate, with image and text, according to an external file "photos.json".  But I'm a noob at coding so I don't know what my mistake is... if anyone could help me understand what I'm doing wrong i would appreciate it.. ty..

    About the first image: you've got a wrong line inside $.getJSON:
    $.getJSON("data/photos.json", function(data){
             maxImages = data.length-1;
              for(var i=0; i<data.length; i++){ imageArray.push({"image":data[i].image,"title":data[i].title}); }
              sym.$("PlaceHolderText").html(imageArray[currentImage].title);
              mySlidingImages.$("ImageHolder1").css({"background-image":"url('"+imageArray[currentImage ].image+"')"});
              mySlidingImages.play("Rest"); // the wrong line
              mySlidingImages.play(); // a better slideIn effect.

  • External files opening behind the projector

    I have used 'baOpenFile' function to open some external files
    (pdf, pps etc). In most computers everything works great, but in
    some computers the file opens behind the projector (which is in
    full screen mode), and user doesn't see that the file has opened.
    To solve this problem I have used
    'baWindowToBack(baWinHandle())' to send the projector window back
    before the external file opens. It works, but it's ugly solution
    (especially if there's many windows open on desktop). Does anyone
    know why external files open behind the projector, and is there a
    better way to fix the problem than the one that I've used?

    Instead of sending the Director window to the back, it may be
    better to
    bring the new window to the front. That will bypass the issue
    of other
    windows appearing over the Director window.
    I do not know why this happens, and I have seen it in action
    many times
    myself. It is annoying, but easily worked around.

  • Creating Target Group from External File

    Hello Experts
    We need to create target group from external file. (That is to say we will have let's say txt file containing BP that belongs to specific target group and we need to assign these BPs to to specific target group in SAP CRM)
    I have searched for it on sdn and found something benefical. I have found BAPI_TARGETGROUP_CREATE, I have checked it but I don't understand how should we use it becuase as far as we understand it just creates target group, we cannot see anything related with Business Partner. How can we relate BPs with the target group we create by this BAPI.
    What should we do, is anyone have previous experience about it? or is there a way to do it without using BAPI.
    thanks it advance
    M.
    Edited by: Mehmet Ergul on Jan 22, 2009 11:19 AM

    Hi,
    You can do this from within the standard Web UI. It's straight out of the box.
    Create a profile set and in there create a target group in the target group assignment block just by entering the description of the target group. Then enter edit mode of this target group and click the button "Import Members". Remeber to mark "Change selected target group" unless you want to create a new target group.
    /Anders

  • Error while Creating External definition with WSDL file

    Hi ALL,
    I need to create a External defination with a WSDL file in PI 7.1.so i selected the Option WSDL & From all available message defination while creating External defination  & imported the WSDL file.
    I am getting an error
    javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.NoSuchMethodError: com.sap.aii.utilxi.wsdl.api.WsdlHandler.parseWsdlWithOrderRearrange(Lcom/sap/aii/utilxi/xml/xdom/XElement;Z)Lcom/sap/aii/utilxi/wsdl/api/Wsdl; java.lang.RuntimeException: java.lang.NoSuchMethodError:
    Note : i checked the WSDl file in altova its no error's ,i know there is no problem with the WSDL file ,i tried importing the same in other XI 3.0 system it has no problem.
    help me in solving this ..
    Regards
    Shakeif

    Hi Tony,
    Somehow I solved this issue. I dont remember what exactly I did, as it was sometime back in December. I think I used the Wizard initially to do the configurations in Solution Manager and again i tried to do the same manually as the earlier one threw some errors.
    It seems the wizard proceeded half-way through and hence the entry was made in the database already and hence that error.
    Anyways thank you for replying me.
    best regds,
    Alagammai.

  • Java code to create a new .txt file in FTP server  --- Help

    Hi,
    I wrote a standalone java app which creates a .txt file in my local machine and transfers it to FTP server. But my requirement now is to create a new .txt file with the same content in FTP server itself instead of creating locally with basic java code.
    I'm aware of transfering file from local machine to the FTP server using STOR command of FTP. But i never tried creating a new file & writing content into that in FTP server.
    So, if any one did this before please help me out with source code or any idea ???
    Thank you.
    Vj.

    simply_vijay wrote:
    thanks for your reply. yes i've seen the Apache Commons NET API , but there is no method or class to create a new file in FTP server. I'm really worried how to solve this problem ???Sure there is.
    There's a method where you can write data to a file on the server using an OutputStream, right? Well, instead of writing to a FileOutputStream, write to that OutputStream instead. Remember to close the OutputStream and call the method which says you're finished with the command (I forget what it's called).

  • File receiver: Create empty file named "start.txt" at end of process

    Hello,
    When my file adapter finish the generation of file at the receiver server I want to create another empty file at the same directory named "start.txt". The use of that file if for a scheduled task of OS that only starts a process if start.txt file have been created (the process delete that file).
    How can I do that? I've tried with OS command after precessing but that's for the XI OS not the receiver system SO...
    Then I've seen that I can use ftp command but there isn't ftp command to create a file... only to transfer files.

    You can achive this using script.Write a script/bat to creat a file using ftp connection as well in the script and place in xi machine. Using OS command to call the script before the process ends.
    Unix OS
    Glimpse at OS Command: Yet Another Scenario
    Microsoft OS
    The specified item was not found.
    Regards
    Prabhakar

Maybe you are looking for

  • Itunes not working when i plug ipod in

    I have resetted a ipod classic to the original settings and it will not connect to itunes on my windows 7 computer. A message comes up that says itunes not working and closes it down. What do I need to do to get it back and running so I can put music

  • Record not in plsql but appears in report

    Hi, I am trying to check why certain records are appearing in a Discoverer aging report but not in the Trial Balances. The Discoverer report is based on an sql custom folder with a join to po_vendors with the vendor_id (1 to 1, no outer joins...) . I

  • I can't remember my passwords for macbook pro

    just recieved a mac pro from my brother in law, ialso have a macbookpro, having a hard time trying to get the mac pro to see the macbook.  seems ther are pass word problems. i dont rember putting a pass word on the macbook at all.

  • HT4906 Iphoto nor Aperture are visible in my mac

    I cannot find iphoto nor aperture on my mac when im sure it was in my doc recently. once i click setting and then click on icloud i see iphoto is there but it doesnt have a check on it like the rest theres a button that says 'learn more' ive lready u

  • Page Headers

    My site has many pages and they all have the same header. I have been tring to put a different header on my main page and it is not working out so well. Does any one know of a way the put a header on one amin page and a different header on all the re