I'm having a problem creating a png snapshot of a chart I'm drawing.  I can use 
the 
ImageSnapshot captureImage method but it only draws the elements added during 
the 
creation of the component and if I later add data from messaging or with 
actionscript 
(addChild), it only draws the original elements and not the new data.  Here is 
my method:

 private function captureImg(comp:UIComponent):void {
                var imageSnap:ImageSnapshot = 
ImageSnapshot.captureImage(dynaChart);
                var imageByteArray:ByteArray = imageSnap.data as ByteArray;
                imgSave.saveImage(imageByteArray);
            }

I also have this line in my init() method:  ImageSnapshot.defaultEncoder = 
PNGEncoder;

But I don't even know if I need that for sure.

I then send it to a java servlet to write it to a file.  As I said, it works 
but only writes the visual 
components added during initialization of the application.  So I am just 
getting a blank chart.

Reply via email to