10 Replies Latest reply on Apr 2, 2007 9:41 PM by kglad

    Custom Code Needed!

    bcounts Level 1
      I am working on an admin section for a web page design . . . I have tried a few things an another custom code and have had no sucsess . . . I would be okay with PHP/Flash Scripting but if someone could find a way to do it all from flash that would be even better.

      I need a code that will do the steps below in order:

      1) Load text from a txt file into a text box allowing me to . . . (step 2)
      2) Edit the loaded text as needed . . . (step 3)
      3) When I am done making changes to text I want to click a button . . . (step 4)
      4) Sending the changed text back to the txt file and saving it . . . (see element names)

      1) Text Box Name: about_admin
      2) Button Name: make_live_1
      3) TXT File Name: site_admin.txt
      4) PHP File Name: adminSaveLoad.php - (only if php is needed)

      Please keep in mind that I am changing the text from the txt in the admin section of the site and another text box in another section of my site is loading the text from txt file for public view (again please remember when coding things).

      I hope that you guys/girls can help me with this problem I am having - Thanks in Advance!

      Bryan
        • 1. Re: Custom Code Needed!
          kglad Adobe Community Professional & MVP
          1,2 and 3 can all be done in flash. step 4 would require a server-side program and php is capable.

          you can use the LoadVars() class to load your text file and its onLoad() method to populate an input textfield that can then be edited. again, use LoadVars() to call you php script to write the textfield's text to a server-side text file.
          • 2. Re: Custom Code Needed!
            DZ-015 Level 1
            Is there any reason not to just use php and forms in HTML? It sounds like flash is just going to complicate (and slow down / bulk up) what you are trying to do... which is just simple text editing and submission.
            • 3. Re: Custom Code Needed!
              bcounts Level 1
              Kglad,

              1) Would you aggree with DZ-015 or should I be okay in flash?

              2) Could you write me a code for flash using my original post components?

              3) Also if you have time and the knowlege - could you write the PHP code for me?

              Finally, when I do get the codes I would not need to add any kind of http:// along with the loadVars since they will be on my sever when all of these actions occur?

              Thanks for all the help so far and any you offer in the future!

              - Bryan
              • 4. Re: Custom Code Needed!
                Level 7
                > 2) Could you write me a code for flash using my original post components?
                >
                > 3) Also if you have time and the knowlege - could you write the PHP code
                for
                > me?

                4) My car is a bit dirty, really could use a clean if you have time

                5) The cat is hungry - please feed her.

                6) I'm having some trouble with my homework - could you do that for me too
                please?

                :))

                There's a difference between asking for help and advice and asking someone
                to work for you for free...
                --
                -------------------------------
                Remove '_spamkiller_' to mail
                -------------------------------


                • 5. Re: Custom Code Needed!
                  kglad Adobe Community Professional & MVP
                  i disagree with dz: using flash won't complicate this task. and i agree with pb: that's a bit much to ask.

                  read about the LoadVars() class. in particular, how to create a loadvars object and read about its onLoad() method.

                  complete steps 1,2 and 3. if you need help with your code, post the code you're trying.

                  then go to google search for "php write file".

                  this isn't a difficult task and you should be able to finish it with no more than some advice and a correction or two.

                  but if you can't do it, hire someone. we're not here to do your work.
                  • 6. Re: Custom Code Needed!
                    bcounts Level 1
                    I found a tutorial and tried to alter to my project - does not seem to work!

                    Here is a link to what I have - can you take a look at the flash/php codes and see what needs to be fixed:

                    http://apsiaustin.com/admin.zip

                    Thanks For Everything - Bryan
                    • 7. Re: Custom Code Needed!
                      Level 7
                      Daddy, I want another pony !!!
                      • 8. Re: Custom Code Needed!
                        kglad Adobe Community Professional & MVP
                        http://www.gladstien.com/Files/admin.zip

                        if you have any questions post them and the relevent code. this forum isn't just for your benefit. other people may have similar questions and can benefit from the questions and answers posted here.

                        you uploading a file with problems and me posting a link to your corrected file only benefits you. noone else is likely to benefit.
                        • 9. Re: Custom Code Needed!
                          bcounts Level 1
                          Thank You for your help I will take a look at the file you provided.

                          How do I do the attach code (blue box) here in the forums? I never know how to include lots of code without it fading into my posted thread!
                          • 10. Re: Custom Code Needed!
                            kglad Adobe Community Professional & MVP
                            use the replay (not quick reply) and you'll see an attach code option.