Hello Karin please see the following I've highlighted in red, this works for me - hope this helps/works :
import hype.extended.color.ColorPool;
import hype.extended.layout.ShapeLayout;
import hype.framework.core.ObjectPool;
//must have the following 3 frameworks imported for PNG's to be exported
import hype.extended.util.ContextSaveImage;
import hype.framework.canvas.encoder.PNGCanvasEncoder;
import hype.framework.display.BitmapCanvas;MyShape.visible = false;
//must have the following 5 lines included for PNG's to be exported
var myWidth = stage.stageWidth;
var myHeight = stage.stageHeight;
var bmc:BitmapCanvas = new BitmapCanvas(myWidth, myHeight);
addChild(bmc);
var clipContainer:Sprite = new Sprite();var pool:ObjectPool = new ObjectPool(MyCircle, 50);
var layout:ShapeLayout = new ShapeLayout(MyShape);
var color:ColorPool = new ColorPool(
0x587b7C, 0x719b9E, 0x9FC1BE, 0xE0D9BB, 0xDACB94, 0xCABA88, 0xDABD55, 0xC49F32, 0xA97409
);
pool.onRequestObject = function(clip) {
clip.scaleX = clip.scaleY = (Math.random() * 0.75) + 0.25;
layout.applyLayout(clip);
color.colorChildren(clip);
clipContainer.addChild(clip);}
pool.requestAll();
// setupLargeCanvas(10) = scaleFactor x 10 (640 x 360 Stage / 6400 x 3600 PNG)
bmc.setupLargeCanvas(10);
var saveImage:ContextSaveImage = new ContextSaveImage(bmc, PNGCanvasEncoder);
bmc.startCapture(clipContainer, true);