A Flash Developer Resource Site

Page 3 of 3 FirstFirst 123
Results 41 to 47 of 47

Thread: Editing text files from web site?

  1. #41
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    I would just make a bunch of textfields with VARIABLE names. Write the info in them and use the save button to save to the textfile.

    I would have the loading code as soon as the movie starts. Then all variables are loaded from the beginning and will automatically put themselves in the correct textfield ( when the timeline shows one ).

    Im not familiar with the text editor , I just use simple textfields with variable names.

    Are your paths correct to the textfiles. Usually the whole internal server path to the folder where the textfiles are located is written in the cgi script, so the filename would just be the name of the textfile.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  2. #42
    Celebrity By Association FrankieB's Avatar
    Join Date
    Jul 2003
    Location
    The Matrix, KY
    Posts
    114
    I must be a complete retard because I've brewed over this all night and still can't come up with anything.
    ---In The Conflict Of Stream And Stone, The Stream Will Win, Not By Strength, But By Persistence---

  3. #43
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Do you have the scripts working?
    I mean so you are shure all paths are correct?

    Do a simple test.New fla....

    Make a textfield on the first frame
    Give it a VARIABLE name of testing

    Also on the first frame have the loading script...

    filename="nameOfTextFile"; // Should not include .txt suffix
    this.loadVariables("patheToReadScript.pl","POST");

    Then make a save button ......

    on(release){
    this.loadVariables("pathToWriteScript.pl","POST");
    }

    Thats all. When you have saved something , reload the movie and the text should appear.

    If it does not, something is wrong with the pathes, write permission of the files or something strange with the server ot you used the wrong version of the script ( it comes in windoes and unix versions ).

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  4. #44
    Celebrity By Association FrankieB's Avatar
    Join Date
    Jul 2003
    Location
    The Matrix, KY
    Posts
    114
    It's still not putting the contents of the original text file in the input box.

    That and it didn't save either.

    I can post the .fla if you would like to see it.
    ---In The Conflict Of Stream And Stone, The Stream Will Win, Not By Strength, But By Persistence---

  5. #45
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Its probably something with the scripts on the server. But upload the fla in MX format and I'll have a look.

    Also try and use a absolute path to the scripts, as links in Flash are relative to the html location, so if your swf is in another folder on the server than the html , your paths are probably wrong to the scripts.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  6. #46
    Celebrity By Association FrankieB's Avatar
    Join Date
    Jul 2003
    Location
    The Matrix, KY
    Posts
    114
    The swf appears outside of the cgi-bin that has the perl files in it, and also outside of the data folder which has the text files in it.

    When it starts just click the News button, the other sections havent been configured yet. Only thing I've edited is contents on frame 2.

    There are some aspects of the editor that mimic other fla's that have appeared in this thread, for testing purposes.

    I have uploaded the .fla to one of my servers, it's a bit too big for flashkit.
    Last edited by FrankieB; 06-15-2005 at 10:53 PM.
    ---In The Conflict Of Stream And Stone, The Stream Will Win, Not By Strength, But By Persistence---

  7. #47
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Your scripts works fine. So do the saving part of your fla ( only the news section as its the only textfield with a variable name ).

    Its your loading button that does not work as it has the wrong filename and adress. The loading button is not needed as all changes made will still be in the swf file.

    What you should do is to have the loading action on a frame before anything else, so when you go to news section it will be automatically filled with the text from the textfile.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

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