Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8008527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:09:56+00:00 2026-06-04T18:09:56+00:00

I am trying to have my program able to read in data from a

  • 0

I am trying to have my program able to read in data from a .csv and display the contents in a specific fashion. I am trying to use the URLLoader class to do so. The following is the code my function for reading in the file

//Instantiate the URLLoader and set up the exception handling associated with it
var loader:URLLoader = new URLLoader();
loader.addEventListener( IOErrorEvent.IO_ERROR, handleIOError );
loader.addEventListener( HTTPStatusEvent.HTTP_STATUS, handleHttpStatus );
loader.addEventListener( SecurityErrorEvent.SECURITY_ERROR,  handleSecurityError );
loader.addEventListener( Event.COMPLETE, handleComplete );

//Next load the options file that will have location of .csv file
loader.dataFormat = URLLoaderDataFormat.TEXT
loader.load(new URLRequest("testData.csv"));
trace("data: " + loader.data);

Running this code results in the trace printing “data: undefined”, upon debugging I saw that the URLLoader.load wasn’t actually changing any of the fields in loader. My understanding was that this method was supposed to put the loaded data into the data property. If anyone has any ideas as to what could be causing the error I would be extremely grateful.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T18:09:57+00:00Added an answer on June 4, 2026 at 6:09 pm

    This is how you should do it programmatically, it’s basically the code format of Torious’s words mentioned above. Good luck!

    var myTextLoader:URLLoader = new URLLoader();
    myTextLoader.addEventListener(Event.COMPLETE, onLoaded);
    myTextLoader.load(new URLRequest("myText.txt"));
    
    function onLoaded(e:Event):void {
        trace(e.target.data);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently trying to have my C program read Unix arguments from the user.
I have a program that reads input from a file. I am trying to
I have been trying to call a mapreduce job from a simple java program
For a class I have to write a program to read in a text
Using Python (3.1 or 2.6), I'm trying to read data from binary data files
I have been trying to strip out some data from HTML files. I have
I have been at work this afternoon trying to use a backgroundworker to read
The program I'm working on crashes sometimes trying to read data at the address
I am trying to read data from Excel file into my windows application. Connection
So I am trying to read sensor data from an IMU and update angles

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.