Hello. I'm stumped.

I'm creating some circles in AS and putting them on a Canvas that's declared in my MXML file like so

var childCanvas:Canvas = new Canvas();
childCanvas.graphics.lineStyle(1, 0x333333, 1);
childCanvas.graphics.beginFill(0xCCCCCC,0.6);
childCanvas.graphics.drawCircle(200,150,7);     
childCanvas.graphics.endFill();
childCanvas.id = "myCircle";
childCanvas.toolTip = "I'm a circle";

mainCanvas.addChild(childCanvas);

This all works fine. However, I want to add some text next to the circle (with AS) and I can't see how to do it. I've tried many ways and nothing worked. It seems I can't add an instance of a text object as a child to the canvas in the same way that I can a shape. How should I be doing this?

Guy

Reply via email to