A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Working with files

  1. #1
    Junior Member
    Join Date
    Jul 2000
    Posts
    19
    Is it possible to download only the first line of a text file? (a php script in my case). I only want to load the variable on the first line, without wasting the bandwidth on anything else. Can anyone help?

  2. #2
    Senior Moderator
    Join Date
    Apr 2000
    Location
    Sheffield, UK
    Posts
    3,881
    Not really,when you use the load variables command in flash it will load everything it finds ie var=value&var2=value2 and so on...

    The only way would be to write a script(cgi,asp,php3) that will get only the first line from the textfile or script or whatever and then output it to flash when the script is called


    Hope that helps!!
    Regards FlashGuru

  3. #3
    Junior Member
    Join Date
    Jul 2000
    Posts
    19
    Thanks for a fast reply!
    Unfortunately I can't do what you're suggesting.
    What happens is that my [free] host automatically adds some javascript pop up code to every html/php file.
    So when I output some variable to flash, it sees the following:
    ----- somefile.php ------
    somevar=blah%20blah%20blah<script language="javascript"> somecode </script>
    -------------------------
    The way I found to circumvent this is to output the variable in php as:
    echo "$somevar&blah=";
    which basically assigns the javascript code to a variable blah and subsequently ignores it. However if I had to download this file every second (or even more frequently), the precious speed would drop drastically.
    I really hope that Flash 5 would add some means of working with files other than are currently present.

  4. #4
    Senior Moderator
    Join Date
    Apr 2000
    Location
    Sheffield, UK
    Posts
    3,881
    Flash 5 doesnt either

  5. #5
    Junior Member
    Join Date
    Jul 2000
    Posts
    19

    ARG

    GRRRRRRR

    That sure sucks...

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