/*
 * D2F
 * Copyright (C) SatisKia. All rights reserved.
 */

#include "_Global.h"

class _LoadVars
{
	var _m:_Main;

	var _vars:LoadVars;
	var _busy:Boolean;

	function _LoadVars( m:_Main )
	{
		var ref:Object = this;

		_m = m;

		_vars = new LoadVars();
		_vars.onLoad = function( success:Boolean ):Void
		{
			ref._m.onLoadVars( success, ref._vars );
			ref._busy = false;
		};
	}

	function connect( url:String, vars:LoadVars, method:String ):Void
	{
		_busy = true;
		vars.sendAndLoad( url, _vars, method );
	}

	function busy():Boolean
	{
		return _busy;
	}
}
