How to read a local file using as3 in a flash object in HTML? [urgent]

My web site contains a flash object.
I want to use as3 to read some local .txt file
by getting the user directory of the file.
i know AIR can support this by sth like:
File.desktopDirectory.resolvePath
but when i open a AIR file for this, it seems
the action cant be run when i embed it in html.
And i tried to use the above function in a normal
flash file in the action script.
But it cant recognize the File. class..
How can it be done ?
It's reli urgent,
please help...
Thanks !

a web based flash app can't detect user directories.  you can use the filereference class'es browse method to let the user locate a file in any directory the user wants.  flash can then retrieve the file's name and type.  but, as mentioned before,  flash can't determine the file's directory.

Similar Messages

  • How to read a text file using Java

    Guys,
    Good day!
    Please help me how to read a text file using Java and create/convert that text file into XML.
    Thanks and God Bless.
    Regards,
    I-Talk

         public void fileRead(){
                 File aFile =new File("myFile.txt");
             BufferedReader input = null;
             try {
               input = new BufferedReader( new FileReader(aFile) );
               String line = null;
               while (( line = input.readLine()) != null){
             catch (FileNotFoundException ex) {
               ex.printStackTrace();
             catch (IOException ex){
               ex.printStackTrace();
         }This code is to read a text file. But there is no such thing that will convert your text file to xml file. You have to have a defined XML format. Then you can read your data from text files and insert them inside your xml text. Or you may like to read xml tags from text files and insert your own data. The file format of .txt and .xml is far too different.
    cheers
    Mohammed Jubaer Arif.

  • How to read two text files using the Read from spreadsheet.vi and then plot it

    I need to read two text files using the read from spreadsheet function and then plot these files over time.
    The file with the .res extention is the RMS values (dt and df) and the second file contains the amplitude of a frequency spectrum.
    I really appreciate any help..thanks
    Attachments:
    RMS.txt ‏1 KB
    FREQUENCY.txt ‏1 KB

    From NI Example Finder:
    Write to Text File.vi
    Read from Text File.vi
    Jean-Marc
    LV2009 and LV2013
    Free PDF Report with iTextSharp

  • How to read and write files using flex?

    Using flex, we would like to make some utility that will do a
    lot of reading and writing from local files.
    The writing is what I am more worried about. How is this
    possible?
    I want to make .zip files containing many xml files, and some
    assorted media files such as .swf jpeg, html, etc.
    I am new to flex btw, I've never used it properly before, and
    this is the main concern I have with flex, which is that it doesn't
    let me write and read lots of files.
    Mainly we are looking for a good cross platform solution that
    will let us develop an app, and flex looks professional and it is
    cross platform. The "internet app" side of things, isn't so much
    what we need really.
    Would wxWidgets be better suited to our needs?

    The Flash player sand box will not allow reading and writing
    local files. If you want to use Flex to create a desktop you will
    need the Apollo runtime. The alpha is available at Adobe
    Labs.

  • How to Read a CSV file using pure PL/SQL

    Hi friends - Is there a possibility to read a .TXT/CSV file from a local machine and display the contents on the form fields each record at one time.
    The logic to flow through the records can be build, but the problem is where to begin from to start reading the file using PL/SQL. I don't want to use any third party component/API as such. Is there any way in forms by using PL/SQL to read an external CSV file and interpret the contents.
    I have read about SQL * Loader on some sites but cannot find any way to invoke it on windows platform. There seems to be UNIX commands to invoke the .CTL file that is used by SQL Loader. Any help is much apreciated.
    Rgds

    Hi Thanks for your replies, TEXT_IO seems to be a solution but not very comprehensive as it provides limited exposed functions to perform complex operations while read and write of files.
    I think SQL*Loader is a valid solution, but as I stated in my original quote Im not able to invoke it from the command prompt. The command that is shown on the suggested URL(http://www.orafaq.com/faqloadr.htm) is not found on my machine. I have Windows 2K installed. Is there a seperate patch or a download available from where I can get that .EXE to invoke the utility.
    Thanks..

  • How to read any text files using file adapter as it is

    Hi,
    I need to build bpel process to read any text files as it is.I am file adapter and using opaque schema.But input file is coming as base64encoding format.But i need the input as it is.How can i do that.
    Is there any sample schema to read input text files as it is?

    in java embedding activity i need to remove all newlines from my input text file.During this process i am getting arryindexoutofbounds exception.Below is my code
    String input = (String)getVariableData("inputFileStr");
    Base64Decoder Decoder = new Base64Decoder();
    try
    String decoded = Base64Decoder.decode(input); --exception is coming at this line
    setVariableData("inputFileStr", decoded);
    decoded = decoded.replaceAll("\\n|\\r", "");
    byte[] outputBytes = decoded.getBytes();
    String reencoded = Base64Encoder.encode(outputBytes);
    setVariableData("outputFileStr", reencoded);
    catch(Exception uee)
    uee.printStackTrace();
    below is stack trace:
    09/02/26 08:10:33 java.lang.ArrayIndexOutOfBoundsException: -1
    09/02/26 08:10:33 at com.collaxa.common.util.Base64DecoderStream.decode(Base64DecoderStream.java:162)
    09/02/26 08:10:33 at com.collaxa.common.util.Base64DecoderStream.decode(Base64DecoderStream.java:143)
    09/02/26 08:10:33 at com.collaxa.common.util.Base64Decoder.decode(Base64Decoder.java:36)

  • How to read a .CSV file using UTL_FILE

    HI,
    How do i read a .csv file line by line using UTL_FILE?
    Thanks in advance
    Regards,
    Gayatri

    ----do open the file logic
    begin
    ----Let's say this file is delimited by ','
    ---declare variables
    v_startPos number; -- starting position of field
    v_Pos number; -- position of string
    v_lenString number; -- length
    v_first_field varchar2(30);
    v_second_field varchar2(30);
    v_third_field varchar2(30);
    v_fourth_field varchar2(30);
    input_String varchar2(1000); -- buffer for each line of file
    ----Say you have a 4 column file delimited by ','
    delimitChar varchar2(1) := ','
    Joe;Joan;People;Animal
    Teddy;Bear;Beans;Toys
    begin
    loop
    utl_file.get_line(input_file, input_String); -- get each line
    ---- this will get the first field as specified by the last number
    v_Pos := instr(input_String,delChar,1,1);
    v_lenString := v_Pos - 1;
    v_first_field := substr(input_String,1,v_lenString);
    v_startPos := v_Pos + 1;
    -- this will get the second field
    v_Pos := instr(inString,delChar,1,2);
    v_lenString := v_Pos - v_startPos;
    v_second_field := substr(input_String,v_startPos,v_lenString);
    v_startPos := v_Pos + 1;
    -- 3rd field
    v_Pos := instr(inString,delChar,1,3);
    v_lenString := v_Pos - v_startPos;
    v_third_field := substr(input_String,v_startPos,v_lenString);
    v_startPos := v_Pos + 1;
    -- last field -- there is no delimiter for last field
    v_Pos := length(input_String) + 1;
    v_lenString := v_Pos - v_startPos;
    v_fourth_field := substr(input_String,v_StartPos,v_lenString);
    end;
    EXCEPTION
    WHEN no_data_found then
              fnd_file.put_line(FND_FILE.LOG, 'Last line so exit');
              exit;
    end loop;

  • How to read a .pdb file using J2ME

    hi all,
    I am using J2ME to write a program that need to read a .pdb file.
    The .pdb file was generated by other application.
    The .pdb file could not be open using J2ME's RecordStore class.
    How can I open the .pdb file using RecordStore or use other approach?

    You'll need the FileConnection api in JSR-75. Note that your device needs to support this! And no, there is no code to read the file format. You'll need to do that yoursels.

  • How to read a blob file using dbadapter

    how to read or select a blob file in a table using dbadapter

         public void fileRead(){
                 File aFile =new File("myFile.txt");
             BufferedReader input = null;
             try {
               input = new BufferedReader( new FileReader(aFile) );
               String line = null;
               while (( line = input.readLine()) != null){
             catch (FileNotFoundException ex) {
               ex.printStackTrace();
             catch (IOException ex){
               ex.printStackTrace();
         }This code is to read a text file. But there is no such thing that will convert your text file to xml file. You have to have a defined XML format. Then you can read your data from text files and insert them inside your xml text. Or you may like to read xml tags from text files and insert your own data. The file format of .txt and .xml is far too different.
    cheers
    Mohammed Jubaer Arif.

  • How to read the excel file using webdynpro abap?

    Hi,
    how to read and modify excel file using webdynpro abap?
    Regards,
    Pavani

    For reading excel file follow the steps :
    1. Use a File upload UI element and bind it with xstring.
    2. Now your excel will be uploaded and stored in Xstring.
    3. Convert Xstring to String data using FM 'HR_KR_XSTRING_TO_STRING'.
    4. Now split the string at new line so as to make an internal table .
      Ex . SPLIT l_string  AT cl_abap_char_utilities=>newline INTO TABLE it_table.
      here it_table is type table of string.
    5.now loop at the internal table and separate the content of this table separated by tab.
      Ex. SPLIT wa_table AT cl_abap_char_utilities=>horizontal_tab INTO TABLE it_new.
    it_new type string_table.
    6. For more info , refer this thread :
    Re: How to upload excel file in Webdynpro application using ABAP

  • How to read a local file from Applet Code

    Hi
    I am developing a application and i want to access a local file from the applet
    So pls help me in coding for this

    You can't do that, at least not with an unsigned applet.
    Sign your applet and it should work just like normal file access.

  • How to read a text file using adobe javascript

    Hi,
    I have a api application which adds toolbar to a adobe acrobat. i need to disable the toolbar according to expiry date, So i need to fetch the expiry datge from a text file from the specified location.
    I am using importTextData() function to get the textdata from text file using adobe javascript. When i call this function i am getting error "ReferenceError: importTextData() is not defined".
    I am using Adobe Acrobat 7.0 version.
    Can any one tell how to use the importTextData() function.
    Regards
    Shiva

    calling from javascript file which is placed in the below location.C:\\Program Files (x86)\\Adobe\\Acrobat 7.0\\Acrobat\\Javascripts
    Regards
    Shiva

  • How to read from pdf file using VB

    I have a PDF file which contains three columns, emp no, designation, contact_info. I have 10 rows in that pdf file. I want to read row by row from the pdf file and write into another text file(tab delimited) using VB.
    Could you please help me reading the pdf file?
    Thanks,
    Arindam

    Without reading it in detail, this seems to be automating a save as text function in Acrobat. This will not give you any position information.
    If you want position information without writing a plug-in, you need to use the getPageNthWord and getPageNthWordQuads methods in JavaScript.
    If you have not already done so, you will need to download the Acrobat SDK which has the documentation you need.
    Writing in C# makes even very simple things complicated; if you have a choice, consider VB.

  • How to read a local file from Forms10g using PJC/Bean

    I'm trying to read a file on the client machine using a Bean.
    The code in the Bean is:
    File fp = new File(mFileName);
    printToConsole( "AFTER creating a File object " );
    if (fp.exists())
    I get the message after creating File object. But at the next statement - fp.exists() - the Forms session terminates giving a FRM-92100 - Your connection to the server was interrupted.
    Any ideas?
    Thanks in advance for your help.
    Amit

    Frank, Thank you for your response on signing the jar. That was exactly what I was missing. After signing the jar, I am able to do client level operations.
    Grant, Thank you for asking about WebUtil. To give you a background as to what we are trying to do - to integrate our Forms 10g application with another software - in this case a client-server app. We want to send a message from this app. to our Forms10g app.(a pre-defined Form in the app.) which would initiate certain Forms navigation based on the message. In essence, Forms needs to be "listening" to this app. (in a non-blocking mode, the Forms app. should not be "locked-out" while listening for a message)
    The only way I could think of was to write a Bean (modified version of Frank's Dispatch Event sample on his blog) which would spawn a thread and listen for a message from the other app. For our prototype, I started off with watching for a file on the client machine. The final goal is to listen for a message on MQ. This will facilitate us to integrate our Forms10g app. with any other app.
    Regarding WebUtil, I did not find a way to do the listening/polling in a non-blocking way. Maybe I must have missed the obvious - Frank can very well attest to that.
    Any feedback is most welcome.
    Thanks.
    Amit

  • How to read/write local file in lync silverlight application?

    I tried doing that by various method but an exception pop-ups. My lync silverlight application works fine in browser or out of browser (with elevated permissions) but when I try to do so in lync's window extension (CWE) is throws an exception saying "File
    operation not permitted. Access to path '<some path>' is denied". Please help!
    private void button1_Click(object sender, RoutedEventArgs e)
    try
    if (!string.IsNullOrEmpty(textBox1.Text))
    string path = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "abc.txt");
    StreamWriter writer = File.CreateText(path);
    writer.Write(textBox1.Text);
    writer.Close();
    catch (Exception ee)
    MessageBox.Show(ee.Data + "\n\n" + ee.Message);

    Hi,
    You might post the issue on Lync MSDN forum and more developing expert will help you with Lync SDK. Thank you for your understanding.
    http://social.msdn.microsoft.com/Forums/en-US/communicatorsdk/threads
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support

Maybe you are looking for

  • 3 Beep when i try to boot Snow Leopard (after memory and sad upgrade)

    Good night, I have a Macbook Pro Later 2011 with Yosemite installed and today i tried to upgrade memory and SSD. Memory: 16GB 1600MHz DDR3 (2x8) Corsair 11-11-11-30 1.35v SSD: Corsair 120GB Sata 3 Force GT After installation of my new gear, i tried t

  • Reason for rejection For open line items

    Hi Experts .. I Have checked in Google and in scn But Not able to find exact one How to achieve This Issue Created sales order line item ---150 qnty Now delivered---100 qnty PGI As well as Now Clint wants to give reason For rejection For 50 qnty Now

  • UTF-8 problem on Mac OS X

    Hello, We have a 1.4.1 Java app on Mac OS X. This app writes out a text file, encoded using UTF-8, to a Windows folder. The following code is used: FileOutputStream fout = new FileOutputStream(<windows path>, false); OutputStreamWriter osw = new Outp

  • Tcp/ip unicast protocol between clustermembers

    hi, i want to understand what's happen while synchronizing the cluster members in the unicast case. anybody an idea? i captured the packages between the members, but there are a proprietary protocol i don't understand. regards

  • General ledger view and entry view

    Can any one help me in understanding the difference between GL(general ledger) view and entry view?