9.1.4.1
エイプリルフールにうちのサイトに置いてあった物
package{
import flash.display.Sprite;
import flash.display.StageScaleMode;
import flash.display.StageAlign;
import flash.ui.ContextMenu;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.net.*;
import flash.utils.*;
[SWF(width="800",height="800",frameRate="60",backgroundColor="0x000000")]
public class April extends Sprite{
private var textField:TextField;
private var frames:Number;
private var command:String;
public function April(){
//stage.scaleMode=StageScaleMode.NO_SCALE;
stage.showDefaultContextMenu=false;
stage.align=StageAlign.TOP_LEFT;
textField=new TextField();
textField.width=800;//stage.stageWidth;
textField.height=800;//stage.stageHeight;
textField.multiline=true;
textField.selectable=false;
textField.wordWrap=true;
textField.background=true;
textField.backgroundColor=0x000000;
var format:TextFormat=new TextFormat("_等幅",18,0xc0c0c0);
textField.defaultTextFormat=format;
textField.text="Now loading, please wait...\n\n";
addChild(textField);
frames=0;
addEventListener(Event.ENTER_FRAME,enterFrame);
addEventListener(Event.ENTER_FRAME,scroll);
//stage.addEventListener(Event.RESIZE,resize);
}
private function enterFrame(e:Event):void{
if(frames==60){
textField.text="Susisu isle [Version 9.1.4.1]\n"+
"Copyright(C) 2007-2011 Susisu. All rights reserved.\n\n"+
"C:\\>";
command="";
stage.addEventListener(KeyboardEvent.KEY_DOWN,keyDown);
command=unescapeMultiByte(loaderInfo.url.split("?")[1]);
if(!(command==""||command=="null")){
textField.appendText(command);
dispatchEvent(new KeyboardEvent(KeyboardEvent.KEY_DOWN,true,false,0,13));
}
else command="";
}
frames++;
}
private function scroll(e:Event):void{
textField.scrollV=textField.maxScrollV;
}
private function resize(e:Event):void{
textField.width=stage.stageWidth;
textField.height=stage.stageHeight;
}
private function keyDown(e:KeyboardEvent):void{
if(e.keyCode==13){
if(command.split(" ")[0]=="help"){
var com2:String=command.split(" ")[1];
switch(com2){
case null:
textField.appendText("\n"+
"\"HELP コマンド名\"で各コマンドの詳細情報を表示します\n"+
"ABOUT\tSusisu isleの情報を表示します。\n"+
"BBS\t\t掲示板システムを起動します。\n"+
"CLS\t\t画面を消去します。\n"+
"FLASH\tFlashムービーを再生します。\n"+
"GAME\tゲームで遊びます。\n"+
"GUI\t\tGUIモードで再起動します。\n"+
"HELP\tヘルプを表示します。\n"+
"LINKS\t他のインターネット上のページへ移動します。\n"+
"TOOL\tツールフォルダを開きます。\n"+
"TRASH\tごみ箱を表示します。\n\n"
);
break;
case "about":
textField.appendText("\n"+
"Susisu isleの情報を表示します。\n\n"+
"ABOUT\n\n");
break;
case "bbs":
textField.appendText("\n"+
"掲示板システムを起動します。\n\n"+
"BBS\n\n");
break;
case "cls":
textField.appendText("\n"+
"画面を消去します。\n\n"+
"CLS\n\n");
break;
case "flash":
textField.appendText("\n"+
"Flashムービーを再生します。\n\n"+
"FLASH\n\n");
break;
case "game":
textField.appendText("\n"+
"ゲームで遊びます。\n\n"+
"GAME\n\n");
break;
case "gui":
textField.appendText("\n"+
"GUIモードで再起動します。\n\n"+
"GUI\n\n");
break;
case "help":
textField.appendText("\n"+
"ヘルプを表示します。\n\n"+
"HELP [コマンド]\n\n"+
" コマンド\t指定したコマンドのヘルプを表示します。\n\n"
);
break;
case "links":
textField.appendText("\n"+
"他のインターネット上のページへ移動します。\n\n"+
"LINKS\n\n");
break;
case "tool":
textField.appendText("\n"+
"ツールフォルダを開きます。\n\n"+
"TOOL\n\n");
break;
case "trash":
textField.appendText("\n"+
"ごみ箱を表示します。\n\n"+
"TRASH\n\n");
break;
default:
textField.appendText("\n"+
"このコマンドはHELPでサポートされていません。\n\n"
);
}
}
else if(command.split(" ")[0]=="about"){
textField.appendText("\n\n"+
"Susisu isle [Version 9.1.4.1]\n"+
"Copyright(C) 2007-2011 Susisu. All rights reserved.\n\n");
}
else if(command.split(" ")[0]=="bbs"){
textField.text="";
navigateToURL(new URLRequest("http://susisu.ktkr.net/bbs/"),"_top");
}
else if(command.split(" ")[0]=="cls"){
textField.text="";
}
else if(command.split(" ")[0]=="flash"){
textField.text="";
navigateToURL(new URLRequest("http://susisu.ktkr.net/contents/flash.php"),"_top");
}
else if(command.split(" ")[0]=="game"){
textField.text="";
navigateToURL(new URLRequest("http://susisu.ktkr.net/contents/game.php"),"_top");
}
else if(command.split(" ")[0]=="gui"){
textField.text="";
navigateToURL(new URLRequest("http://susisu.ktkr.net/index.php"),"_top");
}
else if(command.split(" ")[0]=="links"){
textField.text="";
navigateToURL(new URLRequest("http://susisu.ktkr.net/links/"),"_top");
}
else if(command.split(" ")[0]=="tool"){
textField.text="";
navigateToURL(new URLRequest("http://susisu.ktkr.net/contents/tool.php"),"_top");
}
else if(command.split(" ")[0]=="trash"){
textField.text="";
navigateToURL(new URLRequest("http://susisu.ktkr.net/contents/trash.php"),"_top");
}
else if(command.split(" ")[0]=="aprilfool"){
textField.appendText("\n\n"+
"^o^\n\n");
}
else if(command.split(" ")[0]=="sl"){
stage.removeEventListener(KeyboardEvent.KEY_DOWN,keyDown);
textField.text="";
slt=0;
addEventListener(Event.ENTER_FRAME,sl);
return;
}
else{
textField.appendText("\n"+
"'"+command+"'は使用可能なコマンドではありません。\n"+
"コマンドの一覧はHELPコマンドを参照してください\n\n");
}
textField.appendText("C:\\>");
command="";
}
else{
if((e.keyCode>=48&&e.keyCode<=57)||e.keyCode==32){
command+=String.fromCharCode(e.keyCode);
textField.appendText(String.fromCharCode(e.keyCode));
}
else if(e.keyCode>=65&&e.keyCode<=90){
command+=String.fromCharCode(e.keyCode+32);
textField.appendText(String.fromCharCode(e.keyCode+32));
}
else if(e.keyCode==8){
if(command.length>0){
command=command.substring(0,command.length-1);
textField.text=textField.text.substring(0,textField.text.length-1);
}
}
}
}
private var slt:Number;
private var slSteam:Array=[
" (@@) ( ) (@) ( ) @@ () @ O @ O @\n"+
" ( )\n"+
" (@@@@)\n"+
" ( )\n"+
"\n"+
" (@@@)\n",
" ( ) (@@) ( ) (@) () @@ O @ O @ O\n"+
" (@@@)\n"+
" ( )\n"+
" (@@@@)\n"+
"\n"+
" ( )\n"];
private var slBody:String=
" ==== _______ ___________ \n"+
" _D _| |_______/ \__I_I_____===__|_________| \n"+
" |(_)--- | H\_______/ | | =|___ ___| ________________ \n"+
" / | | H | | | | ||_| |_|| _| \_____A \n"+
" | | | H |__--------------------| [___] | =| | \n"+
" | ________|___H__/__|_____/[][] ̄\_____| | -| | \n"+
" |/ | |-----------I_____I [][] [] D |=======|____|________________________|_ \n";
private var slWheels:Array=[
"__/ =| o |=-O=====O=====O=====O ヽ____Y___________|__|__________________________|_ \n"+
" |/-=|___|= || || || |_____/ ヽ___/ |_D__D__D_| |_D__D__D_| \n"+
" ヽ_ノ ヽ_.ノ ヽ_.ノ ヽ_.ノ ヽ_.ノ ヽ_ノ ヽ_ノ ヽ_ノ ヽ_ノ ヽ_ノ \n",
"__/ =| o |=- ̄ヽ / ̄ヽ / ̄ヽ / ̄ヽ____Y___________|__|__________________________|_ \n"+
" |/-=|___|=O=====O=====O=====O |_____/ ヽ___/ |_D__D__D_| |_D__D__D_| \n"+
" ヽ_ノ ヽ_.ノ ヽ_.ノ ヽ_.ノ ヽ_.ノ ヽ_ノ ヽ_ノ ヽ_ノ ヽ_ノ ヽ_ノ \n",
"__/ =| o |=- ̄ヽ / ̄ヽ / ̄ヽ / ̄ヽ____Y___________|__|__________________________|_ \n"+
" |/-=|___|= || || || |_____/ ヽ___/ |_D__D__D_| |_D__D__D_| \n"+
" ヽ_ノ ヽO=====O=====O=====O.ノ ヽ_ノ ヽ_ノ ヽ_ノ ヽ_ノ ヽ_ノ \n",
"__/ =| o |=- ̄ヽ / ̄ヽ / ̄ヽ / ̄ヽ____Y___________|__|__________________________|_ \n"+
" |/-=|___|= || || || |_____/ ヽ___/ |_D__D__D_| |_D__D__D_| \n"+
" ヽ_ノ ヽ_O=====O=====O=====Oノ ヽ_ノ ヽ_ノ ヽ_ノ ヽ_ノ ヽ_ノ \n",
"__/ =| o |=- ̄ヽ / ̄ヽ / ̄ヽ / ̄ヽ____Y___________|__|__________________________|_ \n"+
" |/-=|___|= O=====O=====O=====O|_____/ ヽ___/ |_D__D__D_| |_D__D__D_| \n"+
" ヽ_ノ ヽ_.ノ ヽ_.ノ ヽ_.ノ ヽ_.ノ ヽ_ノ ヽ_ノ ヽ_ノ ヽ_ノ ヽ_ノ \n",
"__/ =| o |=- O=====O=====O=====Oヽ____Y___________|__|__________________________|_ \n"+
" |/-=|___|= || || || |_____/ ヽ___/ |_D__D__D_| |_D__D__D_| \n"+
" ヽ_ノ ヽ_.ノ ヽ_.ノ ヽ_.ノ ヽ_.ノ ヽ_ノ ヽ_ノ ヽ_ノ ヽ_ノ ヽ_ノ \n"];
private function sl(e:Event):void{
textField.text=slSteam[Math.floor(slt/10)%2]+slBody+slWheels[Math.floor(slt/10)%6];
if(slt==1200){
removeEventListener(Event.ENTER_FRAME,sl);
textField.text="C:\\>";
command="";
stage.addEventListener(KeyboardEvent.KEY_DOWN,keyDown);
}
slt++;
}
}
}