A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: how can flash create or change text files

  1. #1
    Registered User
    Join Date
    Mar 2001
    Posts
    42
    search results on this topic didn't satisfy me thats why im asking this.

    how can flash create or change text files, writing any desired content in it? is this possible with projector files only, or can the .swf file do this as well? the thing is, i neither want to build up any website, nor i have a clue about perl and cgi. instead, i've got my swf or exe together with some text files in a local folder on my pc.

    for example i'd like to set a variable that can be used the next time my movie is started.

    then, i've got dynamic textboxes loading the content of a .txt file, using &mytextfield=mycontent. is it possible to let flash add characters(space) to mycontent until the number of characters in my dynamic textbox reaches a certain value ????

    thanks for your precious time

  2. #2
    Whoah there!

    your swf can do all this....

    One thing at a time. You have a text file that you want to change data in therefore you need to get to the file to write to it. This is done by CHMOD the directory to 777 and the text file.You would then access the data by CGI and perl scripts (go to http://www.cgi-resources.com who even have a free selection under databases)

    Ideally you want to stop the cgi script sending acknowledgements to the browser as this kind of buggers it up a bit.

    Don't be frightened of the perl/cgi script as it works very much like the actionscript. If you want a book on it for the uninitiated then see Perl and CGI for the world wide web by Elizabeth Castro (see amazon)

    You can chuck a variable in with the html code when calling your swf, but if it changes on the DB just get it from there.

    As to the spaces you can do this in cgi or flash by extracting the data, counting the characters and adding spaces accordingly into a new variable for display

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