var stage = acgraph.create("container");
layer.rect(0, 0, 500, 300).fill("#FFFFFF 0.01");
var textObject = layer.text(70, 55, "This text will be redrawn on a stage each time, when the stage is resized. Check it by resizing the stage.");
textObject.style({fontSize: "18px", width: "600", textOverflow: "true", textWrap: "byLetter", height: "50"});
textObject.selectable(false);
stage.listen("stageresize", function() {
var w = stage.width()-300;
var h = textObject.height();
if ((h<=100) && (w<600)) textObject.height(600/w);
if (w>600) textObject.height(100)