COLORFUL
it's just a textfield
/**
* Copyright matacat ( http://wonderfl.net/user/matacat )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/l4gH
*/
// it's just a textfield
package
{
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.geom.Matrix;
import flash.text.TextField;
import flash.text.TextFormat;
public class COLORFUL extends Sprite
{
public function COLORFUL()
{
var wz:Number = stage.stageWidth;
var hi:Number = stage.stageHeight;
var m:Matrix = new Matrix();
m.createGradientBox(wz, hi, Math.PI / 2);
graphics.beginGradientFill(
"linear",
[0xFF0000, 0xFFFF00, 0x00FF00, 0x00FFFF, 0x0000FF, 0xFF00FF, 0xFF0000],
[ 1, 1, 1, 1, 1, 1, 1],
[ 0, 42.5, 85, 127.5, 170, 212.5, 255],
m, "pad", "rgb" );
graphics.drawRect(0, 0, wz, hi);
var c:Sprite = new Sprite();
c.graphics.beginFill(0);
c.graphics.drawRect(0, 0, wz, hi);
c.blendMode = "layer";
addChild(c);
var t:TextField = new TextField();
var f:TextFormat = new TextFormat(null, 50, 0, true);
t.autoSize = f.align = "center";
t.defaultTextFormat = f;
t.type = "input";
t.border = true;
t.multiline = true;
t.text = "C\nO\nL\nO\nR\nF\nU\nL"
t.x = wz - t.width >> 1;
t.blendMode = "erase";
c.addChild(t);
}
}
}