package clases{
	import flash.media.Sound;
	import flash.net.URLRequest;
	import flash.media.SoundLoaderContext;
	import flash.events.Event;
	import flash.media.SoundMixer
	import flash.media.SoundChannel;
	import flash.display.Sprite;
	import flash.display.MovieClip
	
	public class sonidoPlay extends MovieClip {
			
			
			public var link:URLRequest
			public var bufer:SoundLoaderContext
			private var canal:SoundChannel = new SoundChannel()
			var son:Sound = new Sound()
			var clip:MovieClip
			
		public function sonidoPlay(linkPasado:String,nivel:MovieClip) {
			
			bufer = new SoundLoaderContext(3000)
			
			link = new URLRequest(linkPasado)
			clip = nivel
	
			
			son.load(link)
			
			
			
		}
		public function  completo(e){
			clip.continuar()
			//trace("cpmpleto")
			}
		public function reproducir(){
			canal = son.play(0)
			canal.addEventListener(Event.SOUND_COMPLETE,completo)	
			}
	}
	
}
