Flash wont load text file

Hi Everyone,
I have a flash program which reads some data in from a text
file and stores them in a list box. The problem im having is that
on one of my computers it works fine, however on the second
computer, there is no log entry in the
windows\system32\logfiles\w3svc1 file which indicates that the text
file has been opened.
So from this i assume that there is something wrong with
flash and IIS. Is there someway to turn off the IIS in flash so it
wont load a "
http://localhost/test.txt"
file?
I think I may have accidentally switched off an option but i
have no idea where this would have been. Any help would be great.
Thanks

hi all
at last i found the way to load text file in to the textArea
it's like
<mx:Script>
<![CDATA[
private function loadText():void {
var l:URLLoader = new URLLoader(new URLRequest('2.txt'))
l.addEventListener(Event.COMPLETE, finishLoading);
public function finishLoading(evt:Event):void {
var myData:String =new String(evt.target.data)
txtBox.text=myData;
]]>
</mx:Script>
this should works because it's work with me
enjoy the code
Sanji

Similar Messages

  • How to load text file data to Oracle Database table?

    By using Oracle Forms, how to load text file data to Oracle Database table?

    Metalink note 33247.1 explains how to use text_io as suggested by Robin to read the file into a Multi-Row block. However, that article was written for forms 4.5 and uses CREATE_RECORD in a loop. There was another article, 91513.1 describing the more elegant method of 'querying' the file into the block by transactional triggers. Unfortunately this more recent article has disappeared without trace and Oracle deny its existence. I know it existed as I have a printed copy in front of me, and very useful it is too.

  • How to load text files in GUI

    plz tell me .. how to load and compare two text files using file popup's . example file i have attached..
    Attachments:
    testW_FF.txt ‏2 KB

    I don't understand whether your question is on how to load text files or how to show them on a panel or how to compare them... or all aspects together!
    The first operation (loading the file) can be accomplished with functions included in the Formatting and I/O Library like OpenFile, ReadFile and so on; with a file like yours even FileToArray could be an option.
    How to show the data on screen is heavily dependent on what you intend to do with them: data can be shown in textboxes, listboxes, tables or graphs so... what do you want to do?
    The same applies with comparison: without additional details is difficult to give you the proper hint.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Loading text file with flash lite 3.0 problem

    Hello,
    I recently ran into a problem with loading a plain text file with Flash Lite 3.0.
    I know there is a way to load name/value pairs using LoadVars class or XML file using XML class. Both methods work great, but these classes parse the data loaded and I need to load just a plain text - no pairs or xml structure. (its because Im loading specific file format, so I can't make any changes to it)
    There is a simple way how to achieve this in Flash using Actionscript 2 by extending the LoadVars class and overriding the onData() method. I used it plenty of times and it works fine.
    There is an example of implementation:
    // the PlainData.as file
    class PlainData extends LoadVars {
        function onData(str) {
            trace(str)
            this.onLoad(true);
    // now in the main file
    var my_data:PlainData = new PlainData();
    my_data.load("my3dmodel.obj");
    This code traces unchanged content of my3dmodel.obj file.
    The problem comes when I try to run this code using Flash Lite 3.0. The code stops working just by changing player version in publish settings to Flash Lite 3.0. It doesnt display any error, but also doesnt trace any content.
    Is there a reason why you cant override onData method in LoadVars class in lite version of flash or am I doing something wrong?
    (also overriding onLoad() method works fine in Flash Lite)
    Ondrej

    Thanks Man
    But i m very unhappy !!! :-(
    1M data to transfer my mp3 files is very small !!! hehehe
    Thanks a lot
    See ya
    Carlos Eduardo Burko - Curitiba - Brazil - Macromedia
    Certified Professional
    "biskero" <[email protected]> escreveu na
    mensagem
    news:e98nrb$a6e$[email protected]..
    > Ciao Carlos,
    >
    > yes you can load mp3. The only issue is that the FL2
    will need to load the
    > entire mp3 in memory which mean you are limited to the
    avalable memory and
    > also
    > there is a limitation of 1M data transfer.
    > Try to create a sample application to test it. You need
    to use the
    > loadSound
    > API.
    >
    > Alessandro
    >

  • Using importTextData to load text files

    I have been having a real issue  trying to load data from text files (tab delimited text file) into my  form.
    It  works fine if I use importTextData() with no parameters and it prompts  for the file name, then the row, but if I try and pass the path and row  it comes back with a -2 result "User Cancelled Row Select".
    My path is  formatted as so: "/C/temp/importfile.txt"
    It has to do with the path  somehow... otherwise my file would not load properly when browsed.
    And before  people let me know I can import my information via an XML file, yes I  know, but for this task, is not an option.
    The end goal is to have a fixed  drop-down on the form and depending on which item they select, Acrobat  will load a text file into various controls.
    I have attached my sample if  someone wants to take a look.
    Any help people can give is greatly appreciated.
    Paul

    My example was not very good. I replaced it with a new (see attached).
    Previously I found my problem to be the header row in the text file was not formatted properly. ie. rather than have "task" as the column header it had to be frmProgressCard[0].frmTasks[0].tblTasks[0].rowTask[0].task[0]
    That does not work any longer.
    I save all the work in LiveCycle as Adobe Dynamic XML Form and then open it in Acrobat Pro to test, but still will not load my data. Returns with "invalid row" error.
    So I think the problem is that first row that is suppose to link up with the text fields in the form, but I can't seem to find the proper format.
    The help file only says to put in the field names, ie. "task", but that does not work.
    Thanks
    Paul

  • How to get applet to load text file and use it

    The applet is loaded from my site and the short text file is updated by a perl script in my cgi-bin, which is called whenever someone loads the html that loads my applet.
    The text file is just a counter string and I'd like to use it to display #.gif's at a certain place on the applet window (no problem there if I can get the text file into the applet).
    How would I get the applet to load the text file into a string or array?
    It has a running thread and I'd like it to update it periodically.

    I believe you can do that with Class.getResourceAsStream.
    Or you can do it explicitly with java.net.* stuff.

  • Java loading text file and doing stuff help

    Hello,
    Can anyone help me with this, I just don't know where to start..
    I need to create a java program which will load up a text file. The text file must be no bigger than 1000 characters (so somewhere there needs to be an exception I am guessing)
    Once loaded, it needs to run some methods on the text file which each return a single statistical count, the methods need to count things like number of white space, number of vowels, frequency of each vowel (this would not need to return a single count but maybe update some sort of array?) , number of printable characters and number of consonants.
    Any help would be very good.
    Dean

    Thanks for the help so far
    But first things first, I should start at the
    beginning.
    I am thinking maybe start with something like from
    the Sun tutorial for 'CopyCharacters.java'.
    So we have the first part of the program that loads
    up the txt file....
    (I really would like to have GUI for this, but I
    can worry about that once the actual program is
    working
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.IOException;
    public class CopyCharacters {
    public static void main(String[] args) throws
    IOException {
    FileReader inputStream = null;
    FileWriter outputStream = null;
    try {
    inputStream = new
    FileReader("input_characters.txt");
    Right, now its time to actually read what is in the
    file and use some of the statements you have
    suggested, can anyone help me get started with this?
    Dean
    public class DeanHomeworkAssignment {
    public static void main(String args[]) {
    //Put your code here
    }There ya go, that should get you started.
    Start by writing the code to open the file.
    This isn't that difficult.

  • SQL Loader - Loading Text File into Oracle Table that has carriage returns

    Hi All,
    I have a text file that I need to load into a table in Oracle using SQL Loader. I'm used to loading csv or comma delimited files into Oracle so I'm not sure what the syntax is when it comes to loading a text file that essentially has one value per row and each row is separated by a carriage return. So when you open the text file, the records look like this:
    999999999 <CRLF>
    888888889 <CRLF>
    456777777 <CRLF>
    456555535 <CRLF>
    345688888 <CRLF>
    So each row is separated by a hard return and I need to tell sql loader that the hard return or next row is the next value to insert into the table. Below is an example of a control file I tend to use as a template for loading csv files but I need to modify it to accomodate this new structure.
    OPTIONS (DIRECT=TRUE,ROWS=100000)
    UNRECOVERABLE
    LOAD DATA
    INFILE 'C:\input.txt'
    BADFILE 'C:\input.bad'
    APPEND
    INTO TABLE TEST_TABLE
    FIELDS TERMINATED BY ","
    TRAILING NULLCOLS
    COLUMN_1
    How to I modify the control file above to use hard returns as the field/row delimiter for my text file?
    Thanks

    Hi there,
    Obviously my intention wasn't to post the same message 4 times....I pressed the "Submit Message" button but the submission hung and I pressed it a few times and finally it worked but it created several versions of my post. You need to allow users the ability to delete there own postings...I was looking for this option but didn't have it.
    Sorry

  • How to load text file

    Dear All,
    How is it possible load a text file that contain SQL commands in the form and then execute the commands.
    Regards

    Hello,
    You can have dynamic SQL within the Forms module via the EXEC_SQL package, but it is not really made to execute a whole file content.
    You could write a databased function (or procedure) that uses the EXECUTE IMMEDIATE instruction, then call this procedure from Forms.
    Anyway, I think that in all cases, you probably have to split your text file in several comprehensives single SQL orders, or at least send entire PL/SQL blocks.
    Francois

  • Loading text file to Essbase - Group By

    Hi All,
    May be someone have an idea...
    I have text file (csv) with detailed data that I want load to Essbase. The data in file is in day level while the minimal period in Essbase is month.
    Using SUM() function I'm trying to aggregate the values but get the error:
    From Execution tab:
    com.hyperion.odi.essbase.ODIEssbaseException: Invalid column type specified for Data column [Data]
         at com.hyperion.odi.essbase.ODIEssbaseDataWriter.loadData(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
    From Description tab:
    sql= """select 'Work Hours' "Account",'Jan' "Period",'PTD' "View",'Translated to USD' "Currency Status",CONCAT('div_', C3_DIV) "Division",'Actual' "Scenario",C2_PROJECT_NUMBER_ "Project",'STAT' "Currency List",'com_100' "Company",'Final' "Version",'FY09' "Year",SUM(C1_HOURS) "Data" from "C$_0Security_ProjectsData" where      (1=1) And (C3_DIV in ('45', '48', '49')) Group By CONCAT('div_', C3_DIV),
    C2_PROJECT_NUMBER_ """
    When I remove SUM() function it loads the file succesufully,
    Is it because groupping is impossible on text datastore or something wrong in my interface?
    Thank you,
    Alexey

    Thank you John very much for the solution. It solved my problem.
    Because I got it by mail I put it here to ba availible for everyone it may be interesting:
    " I take it you are using "SUNOPSIS_MEMORY_ENGINE" as the staging area, if so
    this seems to be the cause, it might be a bug.
    Is it possible you could change your staging area to use a logical schema
    using a relational database (e.g. sql server or Oracle)
    I am able to replicate the issue if I using the memory engine as the staging
    area but I can load the data using a relational staging area.
    I would recommend switching from the memory engine anyway. "
    Thanks a lot.

  • Can load text file in Windows - not on the Mac?

    I have some code that loads a text file into an array that works fine in windows, but fails on the Mac  I'm sure it's a path issue but I've spent several hours trying to work this out.
    Windows code works fine:
        var textPath =  "c:\\temp\\textfile.txt";
         try {
            var myFile = File(textPath);
            var mymenuItems=[];
            var menuItems=[];
            myFile.open('r');
            while(!myFile.eof){
                mymenuItems.push(myFile.readln());
            myFile.close();
    Mac Code Fails
      var textPath = '/User/wizbowes/Desktop/text.txt';
         try {
            var myFile = new File(textPath);  //tried both with and without new - same effect
            var mymenuItems=[];
            var menuItems=[];
           myFile.open('r');
       while(!myFile.eof){
                mymenuItems.push(myFile.readln());
    When debugging on the mac myFile.eof shows true straight after I open the file and therefore never enters the loop to populate the array
    What on earth am I doing wrong?

    1. For files on your desktop you can use a shortcut.
    var textPath = '~/Desktop/text.txt';
    2. Make sure the file object is valid before you open for reading. The new keyword is not really needed it just make clear in the code that you are creating a new file object. However just creating a file object does not means that the file already exists. You could have an invalid path.
    try {
            var myFile = new File(textPath);
            if(myFile.exists){
               // rest of the code
    3. If you don't want to check that the file exists you could check the return of the file.open() method. It should return true if it opened the file when opening an existing file.
    var openSuccess = myFile.open('r');
    if(openSuccess){
        // some code that reads from the file here

  • Load text file with diff delimiters

    I need to load a text file that is pipe "|" delimited except for the last field that is not delimited by a pipe but with whitespace
    when executing the mapping the only place where I get a problem is on the last field
    "Field in data file exceeds maximum length"
    my initial thought was it not using TRAILING NULLCOLS but it is
    But looking at the code it generates the problem is obvious
    I write the code like this
    Options ( Errors = 50, Rows = 2000, BindSize = 90000)
    Load Data
    Infile 'file1.txt'
    Into Table "table_name" Truncate (
    field1               Char          Terminated by '|' ,
    field2               Integer External Terminated by '|' ,
    field3               Char          Terminated by '|' ,
    filed4               Decimal External Terminated by whitespace)
    warehouse builder writes it like this
    FIELDS
    TERMINATED BY '|'
    OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    ( "field1 " POSITION (1) CHAR ,
    "field2" INTEGER EXTERNAL ,
    "field3" CHAR ,
    "field4" Decimal External
    these are two correct way of loading data
    how do I tell warehouse builder to load data where there are more than one termination charater

    s.split(delims) will return an array of strings, not a string. So you need to declare list as an array list of such arrays:ArrayList<String[]> list = new ArrayList<String[]>();(It's a good idea to copy and post compiler messages here, so no-one has to guess. Likewise indicate which line of your code they are referring to.)
    [Edit]If it only the contents of the array you wish to put in the array, then you can just say List list = Arrays.asList(s.split(delims));

  • Load text file into applet

    hi,
    I am new to java and really need some help.
    I want to load / read a text file in my applet line by line
    the text file looks like:
    P,161,127,3,ff6599c2
    P,161,127,3,ff6599c2
    P,161,128,3,ff6599c2
    P,161,129,3,ff6599c2
    etc.
    the code I tied and did not work looks like:
    class read
         public void main( String[] args)
              int i;
              if (args.length < 1)
                   System.out.println("Please enter file: read<datei>");
                   System.exit(-1);
              try
                   BufferedReader in =new BufferedReader(new FileReader( args[0]));
                   String line = new String();
                   while((line=in.readLine())!=null)
                        System.out.println( line );
              catch(IOException e2)
    has anybody an idea how to do it?
    Thanks a lot
    Silke

    <PRE>
    First off you need to create a class which extends the
    Applet class. The applet class does not have the
    method "public static void main(String args[])". Instead it has a method "init()". In the "init" method you should
    write the code that you would write in "main". The "init"
    method is only executed once. When the applet is first downloaded. Here is a sample code, but there is one other factor to note. Applets have trouble accessing
    files on computers. This goes above and beyond the
    applet sandbox which locks up an applet. In my experiences I have only managed to read and write text
    files to the desktop through applets. The program can
    be used by entering the file name in the text field
    at the top of the applet and then clicking the "Read File"
    button at the bottom of the applet. This code segment is untested and it has been some time since I have done
    applet programming but it should work. You may have to
    edit the security policy file(security.policy) to grant permission to your codebase before this functions properly because it involves reading from the file system. The grant should look something like this(if you are running under unix/linux I believe you would substitute"file:\\\" with "file:/"):
    grant codeBase "file:\\\<Directory Path that contains
    the MyApplet class" {
    java.io.FilePermission "read", "*"
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    <Applet Code="MyApplet" width="300", height="300">
    </Applet>
    class MyApplet extends Applet
    implements ActionListener {
    TextArea ta=new TextArea();
    Button readFB=new Button("Read File");
    TextField tf=new TextField();
    public void init() {
    setLayout(new BorderLayout());
    Panel tempPan=new Panel();
    tempPan.setLayout(new BorderLayout());
    tempPan.add("West", new Label("File Name:"));
    tempPan.add("Center", tf);
    add("North", tempPan);
    add("Center", ta);
    add("South", readFB);
    readFB.addActionListener(this);
    setSize(300, 300);
    show();
    public void actionPerformed(ActionEvent ae) {
    String action=ae.getActionCommand();
    if(action.equals("Read File")) {
    String strFileName=tf.getText();
    BufferedReader br=new BufferedReader(new FileReader(new File(strFileName)));
    ta.setText("");
    String nextLine="";
    while((nextLine=br.readLine())!=null) {
    ta.append(nextLine+"\n");
    br.close();
    ps: be careful when modifying security policy file.
    It will affect all applet code that is loaded from the
    codeBase specified. If no codeBase is specified it
    will apply to all codeBases leaving you vulnerable
    to malicious applets. Good luck.
    </PRE>

  • Flash actionscript loads jpg files, no png or gif

    Hi, I'm using this script to load png files, but it does not
    load them, it loads jpgs. It is being pulled from an xml file. I
    have also tried gifs and that does not work. I need to put images
    that have transparency. I can not find any refrence to jpg in the
    code or anything like that. Any ideas would be helpful.
    code:
    Thanks,
    Josh

    Hi, I'm using this script to load png files, but it does not
    load them, it loads jpgs. It is being pulled from an xml file. I
    have also tried gifs and that does not work. I need to put images
    that have transparency. I can not find any refrence to jpg in the
    code or anything like that. Any ideas would be helpful.
    code:
    Thanks,
    Josh

  • Fastest Way to Load Text Files Containing Thousands of Words

    Hi, can anyone give me suggestions for fast loading of files containing many bytes in the form of a single word on a different line. The average file size is 45 kb. I'm currently splitting the words into separate files each containing 4000 words a piece. I use a different thread to read each file and then add all of the words into a single vector, formed by joining the vectors of each reader thread. Any suggestions for speeding up the process? (Currently, it takes about 30 seconds to load 52,000 words). My OS is Windows2000

    Something seems wrong. There is no way that what you describe should take anywhere close to that amount of time, unless the computer is a constraint. I created a file of 56,000 lines, each line consisted of the byte string "abcdefgh" plus a \r\n,
    for a total of 10 bytes per line - a total file size of 560,000 bytes (547 kb)
    The following program read the file, created an ArrayList, and added the 56,000 lines to the list in less than 1 second, about what I expected. You might want to run it and see what you get.
    import java.io.*;
    import java.util.*;
    class Zxin
        public static void main(String[] args)
            throws IOException
            FileInputStream fis = new FileInputStream(
                "C:/Documents and Settings/Chuck/My Documents/Java/junk/word.txt");
            InputStreamReader isr = new InputStreamReader(fis);
            BufferedReader br = new BufferedReader(isr);
            List<String> list = new ArrayList<String>();
            String data;
            while ((data = br.readLine()) != null)
                list.add(data);
            System.out.println("The list contains " + list.size() + " entries");
            System.out.println("The first entry in the list is: " + list.get(0));
            br.close();
    }It printed these 2 lines:
    The list contains 56000 entries
    The first entry in the list is: abcdefgh

Maybe you are looking for