TextField magic
said to be FP 11.2+
package {
import com.actionscriptbible.*;
import flash.display.*;
import flash.text.*;
public class FlashTest extends Example {
public function FlashTest() {
// write as3 code here..
var textfield : TextField = new TextField();
var container : Sprite;
textfield.multiline = true;
textfield.wordWrap = true;
textfield.htmlText = "<img src='flash.display.Sprite' id='container'></img>";
textfield.width = 500;
textfield.height = 500;
addChild(textfield);
container = textfield.getImageReference("container") as Sprite;
var circle : Sprite = new Sprite();
circle.graphics.beginFill(0xFF00FF, 0.5);
circle.graphics.drawCircle(40, 38, 60);
container.addChild(circle);
trace(container.scrollRect==null);
trace(container.mask);
trace(container.mask.getBounds(container));
}
}
}