Newbie: Text mask from library

Hello All,

I’d be mighty appreciative if anyone can help an AS3 newbie mask some shapes. What I want to do is create a loading screen where the text of the Web site “fills up” with a different color. The shapes are being placed in the sprite just fine, but masking the sprite doesn’t seem to be working.

Masky is a text field with text in it converted into a symbol.

Many thanks for any assistance.
MB


stop();

import flash.display.Sprite;
import flash.display.MovieClip;

function loader() {
	// SPRITE TO HOLD SHAPES
	var sp_fill:Sprite = new Sprite();
	addChild(sp_fill);

	// ORIGINAL COLOR
	var lt_rect:Shape = new Shape();
	lt_rect.graphics.beginFill(0xDBE0E9);
	lt_rect.graphics.drawRect(0, 0, 100, 100);
	lt_rect.width = 400;
	lt_rect.height=200;
	lt_rect.x = 267;
	lt_rect.y=242;
	sp_fill.addChild(lt_rect);

	// FILL COLOR SHAPE
	var dk_rect:Shape = new Shape();
	dk_rect.graphics.beginFill(0xA7A8AC);
	dk_rect.graphics.drawRect(0, 0, 100, 100);
	dk_rect.width = 100;
	dk_rect.height=200;
	dk_rect.x = 267;
	dk_rect.y=242;
	sp_fill.addChild(dk_rect);

	// ADD MASK
	var myMask:Masky = new Masky();
	myMask.x = 267;
	myMask.y = 242;
	addChild(myMask);
	
	sp_fill.mask = myMask;

	trace(this.numChildren);

}
loader();