⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ulti.as

📁 在flashmx下编写的程序
💻 AS
字号:
function createDebugMc():Void
{
	_root.createEmptyMovieClip("mcDebug",_root.getNextHighestDepth());
	_root.mcDebug.attachMovie("TextArea","txtDebug",_root.mcDebug.getNextHighestDepth());
	_root.mcDebug.txtDebug.setSize(160,400);
	_root.mcDebug.txtDebug.vScrollPolicy="on";
	//_root.mcDebug.txtDebug.editable=false;
	_root.mcDebug.txtDebug.wordWrap=true;
	_root.mcDebug.txtDebug.visible=true;
	//_root.mcDebug.txtDebug.move(-100,0);
		
}

function trace2(errorMsg:String):Void
{
	_root.createTextField("txtTrace",_root.getNextHighestDepth(),10,10,500,400);
	_root.mcDebug.txtDebug.text=errorMsg;
}

function trace3(msgStr:String):Void
	{
		_root.mcDebug.txtDebug.text+=msgStr;
	}

//assertion
function assert(condition:Boolean,errorMsg:String):Void
{
	if(!condition)trace2(errorMsg);
}

function assertDebug(condition:Boolean,errorMsg:String):Void
{
	if(!condition)trace3(errorMsg);
}

//console show adjusting.
function txtConsoleManager():Void
{
	if(_root.mcDebug.txtDebug.maxVPosition-_root.mcDebug.txtDebug.vPosition<=10)
		_root.mcDebug.txtDebug.vPosition=_root.mcDebug.txtDebug.maxVPosition;
}
//gDebugTxtInterIndex=setInterval(txtConsoleManager,200);

//array ulti operations:
function show2DArr(inArray:Array,rowNum:Number,colNum:Number):Void
{
	var tmpStr:String=new String();
	trace("===starting parse of inArray===");
	for(var i:Number=0;i<rowNum;i++)
	{
		tmpStr=new String();
		for(var j:Number=0;j<colNum;j++)
			{
				//trace(inArray[i][j]);
				tmpStr+=new String(inArray[i][j]);
			}
		trace(tmpStr);
		
	}
	trace("===end parse of inArray===");
}



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -