8 Replies Latest reply on Oct 20, 2009 7:19 PM by Ron Colmen

    Sending Image to PHP

    Ron Colmen Level 2

      I need to build a PDF using PHP to email my images (which are in flash) as an attachment.

       

      Please help me.

        • 1. Re: Sending Image to PHP
          kglad Adobe Community Professional & MVP

          check fpdf.org

          1 person found this helpful
          • 2. Re: Sending Image to PHP
            Ron Colmen Level 2

            Thank you Sir!  I have 2 more questions now.

             

             

            1. How do I check whether my server supports FPDF? because when I ran the file there were 3 error messages.

             

            2. This is what I did so far. How could I attach my BitmapData object?

             

            captured SUCCESSFUL!!

            (Achived this with your supprot in an earlier post)

             

            import flash.display.BitmapData;
            import flash.geom.Matrix;

             

            one_slct.onRelease = function() {
            var bmd:BitmapData = new BitmapData(494.1,402.9);
            var mat:Matrix=new Matrix();
            mat.a=mat.d=1.5;
            bmd.draw(_root.gmb_mc,mat);
            holder1.attachBitmap(bmd,1);

             

             

            Sending data on my FORUM (SUCCESSFUL)

             

            var senderLoad:LoadVars = new LoadVars();
            var receiveLoad:LoadVars = new LoadVars();

            sender.onRelease = function () {

            senderLoad.thename = thename.text;

            senderLoad.sendAndLoad("www.weblink.com/thephp.php",receiveLoad);
            }

            receiveLoad.onLoad = function () {
            if(this.sentOk) {
              _root.gotoAndPlay("success");
            }
            else {
              _root.gotoAndStop("failed"); }
            }

             

             

             

            How to send my BItmapData object to the server side PHP?

            • 3. Re: Sending Image to PHP
              kglad Adobe Community Professional & MVP

              1.  run phpinfo()

               

              2.  use the loadvars class.

              1 person found this helpful
              • 4. Re: Sending Image to PHP
                Ron Colmen Level 2

                Thanks I've extraced the files in my folder on the server.

                 

                Could you please help me with sending the images with LoadVars. Naming the instance name with "senderLoad." will od it?

                • 5. Re: Sending Image to PHP
                  Ron Colmen Level 2

                  I've been working on this since my last post... :| without success.

                   

                  1. Do I need to send the captured image using the following?

                   

                  function ExportBitmap(bmd):Void
                  {
                  var output:String = "";

                   

                  2. Under "LoadVars" Is it correct to pass on the data using the height and width.

                   

                  senderLoad.pixels = output;
                  senderLoad.height = bmd.height;
                  senderLoad.width = bmd.width;

                   

                  3. I'm walking blind with the PHP script in receiving the image and attaching it as a prt of the email. Please help me out with a sample code.

                  • 6. Re: Sending Image to PHP
                    Ron Colmen Level 2

                    Please help...

                    • 7. Re: Sending Image to PHP
                      kglad Adobe Community Professional & MVP

                      this task is probably a little too advanced for you right now.  you should do more background reading or hire someone to do it for you.

                      • 8. Re: Sending Image to PHP
                        Ron Colmen Level 2

                        Thank you very much Sir for your reply.  I was seated here for a long time for your reply and I just came back after my meals and realised that you've replied to few others.

                         

                        I too understand that it's too advanced. But I'd like to achieve it with good guidence. Because to me everything in flash is advanced since 'm just a newbie newbie - neither I could afford to have classes...

                         

                        Please guide me or If you still think it's not possible, it's fine. I understand!