In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

flash on 2010-5-5

Get Adobe Flash player
by kihon 04 May 2010
    Embed
/**
 * Copyright kihon ( http://wonderfl.net/user/kihon )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/dLuq
 */

package
{
	import com.bit101.components.*;
	import flash.display.*;
	import flash.events.*;
	
	public class Main extends Sprite
	{
		private var src:TextArea;
		private var dest:TextArea;
		
		public function Main()
		{
			Style.embedFonts = false;
			src = new TextArea(this, 0, 0, "ロースカツカレー");
			src.width = stage.stageWidth;
			
			var button:PushButton = new PushButton(this, 0, src.height + 10, "変換", onClick);
			
			dest = new TextArea(this, 0, button.y + button.height + 10);
			dest.height = stage.stageHeight - dest.y;
			dest.width = stage.stageWidth;
			
			onClick();
		}
		
		private function onClick(event:Event = null):void
		{
			dest.text = "unicodeRange=\"";
			var text:String = src.text;
			for (var i:int = 0; i < text.length; i++)
			{
				dest.text += "U+" + text.charCodeAt(i).toString(16).toUpperCase() + ",";
			}
			dest.text = dest.text.substr(0, dest.text.length - 1) + "\"";
		}
	}
}