// forked from ahchang's forked from: サブリミナルおたんじょうび for nium // forked from soundkitchen's サブリミナルおたんじょうび for nium package { import flash.display.*; import flash.filters.*; import flash.text.*; import jp.progression.casts.*; import jp.progression.commands.*; import jp.progression.commands.display.*; import jp.progression.commands.lists.*; import jp.progression.commands.tweens.*; [SWF(width=465, height=465, frameRate=60, backgroundColor=0x000000)] public class Main extends CastDocument { private var _messages:Array; private var _txt:TextField; private var _bm:Bitmap; override protected function atReady():void { _txt = new CastTextField({ defaultTextFormat : new TextFormat("Arial", 96), autoSize : TextFieldAutoSize.LEFT }); _bm = new CastBitmap(); _bm.smoothing = true; _bm.filters = [new BlurFilter(4, 4, BitmapFilterQuality.MEDIUM)]; var sp:CastSprite = new CastSprite( { x : stage.stageWidth >> 1, y : stage.stageHeight >> 1, blendMode : BlendMode.INVERT }); sp.addChild(_bm); addChild(sp); var exe:LoopList = new LoopList(0, null, splitMessages); for (var i:uint = 0; i < MESSAGES.length; i++) { exe.addCommand( setNextChar, new Prop(sp, { scaleX: 5, scaleY: 5, alpha: 1, rotation: 0 }), new DoTweener(sp, { scaleX: 0, scaleY: 0, alpha: 0, time: .1, transition: "easeOutSine" }) ); } exe.execute(); } private function splitMessages():void { _messages = MESSAGES.split(""); } private function setNextChar():void { if(_bm.bitmapData) _bm.bitmapData.dispose(); _txt.text = _messages.shift(); var d:BitmapData = new BitmapData(_txt.width, _txt.height, true, 0x0); d.draw(_txt); _bm.bitmapData = d; _bm.x = int(0 - _bm.width / 2); _bm.y = int(0 - _bm.height / 2); } private static const MESSAGES:String = "にうむさん おたんじょうび おめでとうございます! 吉野家、てんやめぐりしましょう!"; } } [ビバProg4] サブリミナルおたんじょうび for nium