8 Replies Latest reply on Nov 23, 2010 12:43 AM by gambino90

    sending and getting data from external file.

    gambino90

      I'm running it in actionscript 1  and 2 since 3 wouldn't work when getting data from external media. I'm  trying to find out how to post data to a PHP file and getting from that  file I'm trying to make the flash for something that works like a game  but differently. Since I just found out how to make the HTML stuff show  up but a lot of times, some of my text will not appear so I don't know  what's going on.

       

      Does anyone know how to send and get data both at the same time from a sample file?

       

      The sample file is example.php

       

      It has to sent information like ID and NAME

      and it has to get information like Description and userID

        • 1. Re: sending and getting data from external file.
          Ned Murphy Adobe Community Professional & MVP

          Here's a link to a tutorial that exolains all about using the LoadVars class.  YOu probably want to focus on the sendAndLoad section, though it will be to your benefit to read thru the entire article.

           

          http://www.sephiroth.it/tutorials/flashPHP/loadVars/

          • 2. Re: sending and getting data from external file.
            gambino90 Level 1

            alright. I read the whole thing and I understood everything it said. I tried putting it as a button so when you click on it, it will send information to a php file and prints it out for the flash file to read and tell you what information was put out. When I did that, it keeps on saying undefined either way I copied from the site itself and even used wamp with mysql to do it and it still said undefined.

             

            Just to let you know, I'm a visual learner and I do not learn by reading or doing. I learn what example was put down in a sample PHP, fla, an swf for understanding what it is supposed to do.

             

            Can you please make just a PHP script that gets information and prints it back up what is inserted and show an example on sending and recieving on the flash thing and combine it into a zip folder uploaded on a server?

            • 3. Re: sending and getting data from external file.
              kglad Adobe Community Professional & MVP

              1.  please don't cross-post.

               

              2.  in your last message you said, "I don't have an issue on anything with as1 and as2. It's just as3".

              • 4. Re: sending and getting data from external file.
                Ned Murphy Adobe Community Professional & MVP

                The tutorial I pointed you to does provide the visuals you requested, both the AS code and sample PHP code, so I can't see where your learning by visuals aspect holds up.... your approach sounds more like you want someone to hand you a tailored solution that you won't need to learn from.  Visuals require reading and doing.  If that fails to get absorbed or you couldn't understand/revise it, what could anyone else prepare for you that would work better?

                • 5. Re: sending and getting data from external file.
                  gambino90 Level 1

                  Ned Murphy wrote:

                   

                  The tutorial I pointed you to does provide the visuals you requested, both the AS code and sample PHP code, so I can't see where your learning by visuals aspect holds up.... your approach sounds more like you want someone to hand you a tailored solution that you won't need to learn from.  Visuals require reading and doing.  If that fails to get absorbed or you couldn't understand/revise it, what could anyone else prepare for you that would work better?

                  I did the tutorial and everything but every time I press the button or even load it, it keeps on saying undefined. I like the have a sample FLA file so I can figure things out. I did everything from the site but it won't work out for me.

                   

                  I did step 5 too because it was almost all that I was looking for but it won't even work. keeps on saying undefined. I would show you but webcam max won't work and I can't show you an example.

                   

                  EDIT:

                   

                  You know it's frustrating when I don't know how the heck I'm supposed to do this stuff. I read the whole dang thing and I still can't get this dang thing working.

                   

                  I did everything. EVERYTHING. I just don't get this crap.

                  • 6. Re: sending and getting data from external file.
                    gambino90 Level 1

                    alright. I'm posting a video of step 1. I did everything on step 1 and it just keeps on saying level0.nome. It will be on my web server momentarily at this link http://gambino-army.com/video/ once it has been uploading. Thankfully, this isn't above my file size limit or I will get it trouble.

                     

                    It shows the site you gave me, it shows the same exact scripts I put in, and it shows the action scripts I put in the flash file. I did everything. STILL NOTHING!!!

                     

                    Will you be able to address the dang issue please????

                    • 7. Re: sending and getting data from external file.
                      gaminflash Level 1

                      Are you sure you followed the tutorial properly? It seems that you have gone through this too fast and i think that is why these errors is popping up.

                      Try to recheck the tutorial and then recheck your code.

                      • 8. Re: sending and getting data from external file.
                        gambino90 Level 1

                        yes. I did everything the site told me to do. I copied the PHP script, put in under WAMP so I can view it as like viewing it from a server and I told the flash to load variables when flash loads up. When I press Control > Test Scene, it just loads up and says level0.nome. I told it to myVar.onload("http://localhost/script.php");

                        and tried loading variables but it still does the same thing. I don't know why it is doing this.