I've done some further tinkering with this, and I can't get any transformed text to appear on a canvas. Am I doing something wrong? Can someone point me to an example that works? Is this a bug?

Here's a simple test case:

var myText:Text = new Text();
myText.text = "Hello";
myText.x = 200;
myText.y = 200;
myText.transform.matrix = new Matrix(1,0,0,-1,0,300);
myCanvas.addChild(myText);


Guy

On 26/02/2007, at 8:53 AM, Guy Morton wrote:

Nope, adding the text children clears my canvas. I think I now know why. After I add all these children to my main Canvas I'm adding a transform matrix to it to flip it vertically, like so:


mainCanvas.transform.matrix = new Matrix(1,0,0,-1);

This works just fine so long as I don't add the text children, but if I do, the canvas ends up empty.

Is this something to do with Flex not being happy to vertically flip my text objects? If so, would that be a bug?

Thanks for your help.

Guy


On 26/02/2007, at 6:39 AM, leds usop wrote:

var childCanvas: Canvas = new Canvas();
var t:Text= new Text();
t.text="this is a circle";
t.x=220;
t.y=140;
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";
childCanvas.addChild(t);


mainCanvas.addChild(childCanvas);




Reply via email to