In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

TextField magic

said to be FP 11.2+
Get Adobe Flash player
by makc3d 05 May 2012
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));
         
        }
    }
}