//-------------------------------------
// 例文を命令エリアに取り出す
//-------------------------------------
commandStr = '';
//commandArea.variable = "commandStr";

_root.ex_bg.meirei.onSetFocus = function() {

    _root.onMouseMove = function() {
        sPos = Selection.getBeginIndex();
        ePos = Selection.getEndIndex();
        commandStr = _root.ex_bg.meirei.text.slice(sPos, ePos);
    };
};

_root.ex_bg.meirei.onKillFocus = function() {

    delete _root.onMouseMove;

    commandArea.text = commandStr;
};

//------------------------------------
//説明文の残り秒数処理(インターバルタイマ)
//------------------------------------
function waitExplain(){

	_global.second--;
	if( _global.second <= 0 ){

		//停止
		//
		clearInterval( _global.interval );

		//開始
		_root.explain._visible = false;
		_global.comStatus = 'ready';
		initHako();
	}

	//残り秒数表示
	explain.timer_t.text = _global.second;

}


//------------------------------------
// 全体処理
//------------------------------------
_root.onEnterFrame = function(){

	//
	//各部品をジワッと表示する処理
	if( _global.comStatus == 'ready' ){
		//
		if( _global.alpha != 100 ){
			_global.alpha += 10;
			
			//
			//箱設定
			for( i=0; i< _global.HakoCount; i++ ){
				_global.hako[ i ]._alpha = _global.alpha;
			}
			//
			//はさみ設定
			sc_close._alpha = _global.alpha;
			ex_bg._alpha = _global.alpha;

		}else{
			//
			//説明文を最前面
			setDepth( ex_bg );
			//
			//通信可に変更
			_global.comStatus = 'idle';
		}
	}
}

