// JavaScript Document
Reproductor = function(conf){
	this.conf = conf;
};

Reproductor.prototype = {
	referenciaActual: '',
	flashObj: function(){
		/*var obj = document.getElementById(this.conf.flashObj);
		console.log('ab');
		console.log(obj);
		console.log(typeof(obj));
		if(typeof(obj) == 'function') return obj;
		else return null;*/
		return this.conf.getFlashObj();
	},
	//escuchadores de eventos
	//eventos exitentes:soundLoaded, soundFalied, soundComplete, playOn, pauseOn, siguienteOn, anteriorOn
	listener: function(evento){
		if(typeof(this.conf[evento]) == 'function'){
			this.conf[evento]();
		}
	},
	cargarArchivo: function(path, nombre, blur,refActual){
		this.conf.referenciaActual = refActual;
		this.flashObj().cargarArchivo(path, nombre, blur);
		
		
	},
	mPlay: function(){
		this.flashObj().mPlay();		
	},
	mPause: function(){
		this.flashObj().mPause();
	},
	setVolumen: function(valor, setIndicador){
		var r = this.flashObj().setVolumen(valor, setIndicador);
	},
	setReproduccion: function(path, nombre, blur){
		this.flashObj().setReproduccion(path, nombre, blur);
	},
	activarEventos: function(){
		this.flashObj().activarEventos();
	},
	desactivarEventos: function(){
		this.flashObj().desactivarEventos();
	},
	activarAnteriorSiguiente: function(){
		this.flashObj().activarAnteriorSiguiente();
	},
	desactivarAnteriorSiguiente: function(){
		this.flashObj().desactivarAnteriorSiguiente();
	}
};