1 Reply Latest reply on May 17, 2006 2:14 PM by blemmo

    Export created web based flash image

    Level 7
      This may be an odd question, but if anyone can offer any ideas on how / if
      this is possible, I would appreciate it.

      I am attempting to create a image editor / markup tool using flash as the
      interface. It will import a dynamic base raster image and allow the user to
      draw and text over it.

      My question is:
      After the user draws and puts text over the image, how can the drawings and
      text (and preferably the base image) be saved or exported into a folder?
      Also can the exported / saved image be referenced and inserted into a
      database.

      Anyone know of any tutorials or any information regarding this?

      --
      Wally Kolcz
      Developer / Support
      ProjectProofing.com



        • 1. Re: Export created web based flash image
          blemmo Level 1
          Why should this be an odd question, it's 2006, the dawn of RIAs ...

          There are different approaches to this, depending on the premises. If you want to use Flash 8 (only), there's the BitmapData class that could get the pixel values of the image, which can be sent to a server that recreated the image from those values. There's a good tutorial here: http://www.sephiroth.it/tutorials/flashPHP/print_screen/, and, similar but more detailed: http://www.quasimondo.com/archives/000572.php.
          Another approach would be collecting all visual data seperately, while drawing, and use this to recreate the image. An example for that is here: http://flash-creations.com/notes/astb_saveshapes.php. Drawing and text could be saved through descriptive values, like point arrays or font info, and be recreated by that. This way is a bit more complex but can be used in versions < Flash 8, and leaves more room for optimization. The BitmapData way is quite ressource consuming, especially for larger images (although this may change with the next Flash version).

          It depends on the way your editor works... if you want to use images from the user's side, there's only way 1, I'd think.

          greets,
          blemmo