import flash.MovieClip; import flash.TextField; import flash.TextFormat; class Test { static var tx : TextField; static var mc : MovieClip; static var bScrolling : Bool = false; static var testCounter : Int = 0; static function main() { mc = flash.Lib.current; mc.createTextField("tx1", 1, 0, 0, 300, 200); tx = Reflect.field(mc, "tx1"); tx.multiline = true; tx.wordWrap = true; tx.html = true; tx.htmlText = 'Ohio Piccalilli 1 quart green tomatoes, chopped 2 red bell peppers, chopped 2 green bell peppers, chopped 2 large onions, chopped 1 small head of cabbage, shredded 1 cup cucumber, peeled, seeded, chopped 1⁄2 cup Kosher or sea salt 3 cups cider vinegar 2 cups brown sugar 1 stick cinnamon 1 teaspoon ground cloves 1 teaspoon allspice 1 teaspoon mustard seeds Combine vegetables with salt and let stand overnight. Drain, pressing out the juice in colander. Place in a large pot and add remaining ingredients. Bring to a boil, and cook until the syrup thickens. Seal in eight pint-size canning jars and place in a cool, dark place for three weeks or longer to ripen.'; var fmt : TextFormat = new TextFormat(); fmt.color = 0x000000; fmt.font = '_sans'; fmt.size = 12; tx.setTextFormat(fmt); mc.addChild(tx); mc.onEnterFrame = nextScroll; mc.onMouseDown = startScroll; mc.onMouseUp = endScroll; } static function nextScroll() { if(bScrolling) { if(testCounter > 3) { if(mc._ymouse > 159) { if(tx.scroll < tx.maxscroll) { tx.scroll++; } } else { if(tx.scroll > 0) { tx.scroll--; } } testCounter = 0; } else { testCounter++; } } } static function startScroll() { bScrolling = true; } static function endScroll() { bScrolling = false; } }