be paranoid about empty buffers
[swfdec.git] / test / image / mask-textfield.as
blob726c382f62362623c04992c50ec91349e80c24ee
1 // makeswf -v 7 -s 200x150 -r 1 -o mask-textfield.swf mask-textfield.as
3 rectangle = function (mc, color, x, y, w, h)
5 mc.beginFill (color);
6 mc.moveTo (x, y);
7 mc.lineTo (x, y + h);
8 mc.lineTo (x + w, y + h);
9 mc.lineTo (x + w, y);
10 mc.lineTo (x, y);
11 mc.endFill ();
14 createTextField ("text", 0, 0, 0, 100, 100);
15 text.background = true;
16 text.backgroundColor = 0xFF00;
17 text.text = "Hello World";
19 createEmptyMovieClip ("a", 1);
20 rectangle (a, 0xFF, 50, 50, 100, 100);
22 text.setMask = a.setMask;
23 text.setMask (a);