A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Split var

Threaded View

  1. #1
    Member
    Join Date
    Mar 2003
    Location
    Netherland
    Posts
    33

    Split var

    Hello,
    i am try to make a KoolMoves chat.
    Now it's almost finish, but only one problem.
    I have 2 Dynamic text fields, one = txt1.text and two = txt2.text

    I wanna split one line (from the perl script), the text a user is get from a other user, and who's online (the names).
    So the perl script (see http://www.screensave.nl/get.pl)
    when you call it, it will show a line like this;

    i=text1;text2;text3&p=user1;user2;user3 etc..

    But how can i split the line, so that it first split the [ i ] text and value and after that the [ p ] the usernames in a other dynamic text field in just one update..
    I use the code below for the text update, and try a lot to change to make it posable to update text and users but till now no success, so i realy hope some one can help me.
    Thank you
    Hans

    update= function (){
    _root.loadVariables("http://www.screensave.nl/get.pl", "POST");
    records = i.split(';');
    for (var b = 0; b < records.length; b++){
    txt1.text=txt1.text+records[b]+'\n';
    }
    i = "";
    _root.txt1.text.scroll += 18;_level0.dwn = 1;
    }

    setInterval( update, 5000, );
    update();
    Last edited by hansverst; 11-14-2006 at 06:49 AM.

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