A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: How could i format this

  1. #1
    Senior Member Jaffasoft's Avatar
    Join Date
    Apr 2001
    Location
    On Travel
    Posts
    1,588

    How could i format this

    This is the way it is for 300 plus in a simple text file one line after the other:

    one@yahoo.com one_name
    two@yahoo.com two names

    I want to change them all around and insert the '||||'s so it's formated to accept and import into this wordpress plugin for adding members.


    one_name||||one@yahoo.com|
    two||||one@yahoo.com|

    Some on the list have two names eg John Black i just want it trimmed to the first names only 'John' bit only.

    this is an old list i'm importing in from somewhere else.

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    can you make use of this method ?
    PHP Code:
    arr = [];

    lv = new LoadVars();
    lv.load("names.txt");

    /* - in names.txt -

    one@yahoo.com Jack
    two@yahoo.com John Black
    three@yahoo.com Jane White
    four@yahoo.com Jerry

    */

    lv.onLoad = function(){
    str unescape(this).split("=&onLoad=[type Function]").join("");
    arr str.split("\r\n");
    for(var 
    n=0;n!=arr.length;n++){
    arr[n] = arr[n].split(" ");
    trace(arr[n][1]+"||||"+arr[n][0]+"|");
    // copy the trace output to a new text file
    }
    };

    /* - output = 

    Jack||||one@yahoo.com|
    John||||two@yahoo.com|
    Jane||||three@yahoo.com|
    Jerry||||four@yahoo.com|

    */ 

  3. #3
    Member
    Join Date
    Apr 2009
    Posts
    41

    i need it in actionscript2.0

    I need function to format number in action script2.0 not in Php

  4. #4
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    ransi1201 - have you replied to the correct thread ? .. i think not

    please note - [ PHP ] tags are used to highlight code to make it easily
    readable, it is not PHP script. If it was, we would say so

  5. #5
    Senior Member Jaffasoft's Avatar
    Join Date
    Apr 2001
    Location
    On Travel
    Posts
    1,588
    Nice one Modified dog can i output that in a basic html page or something. I just don't have flash at the moment!

  6. #6
    Senior Member Jaffasoft's Avatar
    Join Date
    Apr 2001
    Location
    On Travel
    Posts
    1,588
    Or could you make me a swf i could put in html? Please.. Please sorry i would not normally ask this!

  7. #7
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    Flash 8 file and html attached.
    requires names.txt to work correctly.
    Attached Files Attached Files

  8. #8
    Senior Member Jaffasoft's Avatar
    Join Date
    Apr 2001
    Location
    On Travel
    Posts
    1,588
    Bit of a late reply... i finally got this sorted out. Thanks for going to all the trouble of make an attachment swf file etc. It saved a lot of time and made it a lot more easier!!

Tags for this Thread

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