A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: rows and columns...

  1. #1
    Junior Member
    Join Date
    Jun 2008
    Posts
    2

    rows and columns...

    Basically, when I load my external file, I would like it to be displayed in a row and column view. In other words, like a spread sheet.

    I created space in the text file by tapping between each piece of info in the original text file but Flash display's it in a wacky way. None of the "columns" are lined up properly.

    I'm using basic code to call up the text file:

    Code:
    var loader:URLLoader = new URLLoader();
    var myRequest:URLRequest = new URLRequest("chris_disco.txt");
    loader.load(myRequest);
    
    loader.addEventListener(Event.COMPLETE, tb)
    
    function tb(e:Event){
    	myText.text = (loader.data);
    }

    Is there some magic bullet that I seem to be missing.

    PS - I apologize if I'm making no sense what so ever, I didn't get much sleep .

  2. #2
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    Try a monospace font like arial or monaco and make sure there are line breaks between each 'row'...

  3. #3
    Junior Member
    Join Date
    Jun 2008
    Posts
    2
    I tried your suggestion and still no luck.

    My plain text file has the exact spacing that I want Flash to display but just doesn't. The columns are all screwy.

  4. #4
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    I'm not sure what else you can try for a quick-fix...maybe turn on html rendering for the text field and try putting your text block into <pre> tags?

    If nothing is working you could always use Array.split() to cut each 'cell' into an array and then dynamically put those on screen as seperate textfields...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center