4 Replies Latest reply: Oct 26, 2012 8:44 AM by curiousaaron RSS

    symbolItem.exportToPNGSequence()

    community help Community Member

      This question was posted in response to the following article: http://help.adobe.com/en_US/flash/cs/extend/WSd5f4b6c52cfaa4b16a883d5c135312fa05c-8000.htm l

        • 1. Re:  symbolItem.exportToPNGSequence()
          morieris Community Member

          there's a typo in the example, it should read "items" instead of "item":

          fl.getDocumentDOM().library.items[0].exportToPNGSequence("file:///c|/tests/mytest.png");

           

          Also the export seems to fail on 1-pixel tall symbols.  I have tested this by making a new .fla with a single symbol, drawing a rect, and setting it's height or width to 1 pixel.  The export fails with the error:

           

          The bitmap is too large. The largest bitmap that can be created is 8000x8000 pixels.

          The following JavaScript error(s) occurred:

           

          At line 1 of file "test.jsfl":

          Error creating PNG sequence.

           

          There seems to be no way to catch this via try/catch, which would be nice.  Also a more descriptive error message would be helpful.

          • 2. Re:  symbolItem.exportToPNGSequence()
            jrunrandy Employee Hosts

            @morieris,

            Thanks for the tip. I have fixed the example and the updated page should be live in a few minutes.

             

            I will contact Development regarding the 1-pixel high symbols.

             

            Regards,

            Randy Nielsen

            Senior Content and Community Manager

            Adobe

            • 3. Re:  symbolItem.exportToPNGSequence()
              sudeshna sarkar Employee Hosts

              Hi Morieris ,

               

              In Flash , we allow exporting of any image greater than 1 pixel(either height or width) and less than 8000 pixels(again either height or width) using the exportToPNGSequence jsfl api. For anything that falls outside this range , we show a error message dialog. However , the dialog is not so intuitive in cases where the image width or height is less than 1 pixel. The workaround for this problem is to export a symbol of size greater than 1x1.

               

              Thanks and Regards,

              Sudeshna Sarkar

              Adobe Flash Professional Team.

              • 4. Re:  symbolItem.exportToPNGSequence()
                curiousaaron Community Member

                I'm getting this same error with symbols that are well within those size limitations using both of these methods:       document.exportInstanceToPNGSequence()      document.exportPNG()  Any suggestions?