I think you need to set the width/height of the textfield not the
sprite. Or add a mask the the sprite and size that - but you shouldn't
be resizing the sprite to do what you're trying to do.
John Singleton wrote:
Hi;
I have this code:
function Text()
{
parent_container5 = new Sprite();
addChild(parent_container5);
// parent_container5.width = stage.stageWidth/2;
// parent_container5.height = stage.stageWidth/4;
parent_container5.x = 50;
parent_container5.y = 350;
var myText:TextField = new TextField();
var format:TextFormat = new TextFormat();
format.font = 'Arial';
format.size = 12;
myText.textColor = 0x000000;
myText.autoSize = TextFieldAutoSize.LEFT;
myText.x = 0;
myText.y = 0;
myText.htmlText = "Lorem ipsum dolor sit amet";
myText.setTextFormat(format);
parent_container5.addChild(myText);
}
All works well except when I uncomment the width and height lines.
How do I set the width and height so that I can contain my text
within it? Also, when I add <br /> or <p>...</p> to my htmlText it
doesn't have any effect.
TIA,
John
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
--
Matt Perkins
--------------------
http://www.nudoru.com
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders