DuckSoup.addNamespace("flash.bridge")

DuckSoup.flash.bridge = {
	ready : false,
	
	SWFReady : false,
	
	isReady : function(){
		return this.ready
	},
	
	setReady : function(){
		this.ready = true
		//this.load()
	},
	
	loadingTasks: new Array(),
	
	load : function(){
		for (i=0; i < this.loadingTasks.length; i++){
			this.loadingTasks[i]()
		}
	},
	
	addOnReadyTask : function(task){
		if (typeof task == "function"){
			this.loadingTasks.push(task)
		}
	},
	
	setSWFReady : function(){
		this.SWFReady = true
		this.load()
	}
}


