/**
 * Creates the PlayerComponent, which is now a standalone swf file. After
 * creating the component, it doesn't really do anything. It doesn't have to
 * listen for map or resize events anymore!
 * 
 * @author holmes
 */
PlayerComponent = Class.create({

		
	/**
	 * @param key
	 *            that the google map should be initialized with
	 * @param file
	 *            that the player should attempt to load
	 * @param container
	 *            is the element you want the object placed into
	 */
	initialize: function(key, file, container) {
		var element = $(container);
		if(element == null || element == undefined) {
			alert("You must define a valid element! " + container + " is not a valid id!");
		}
		
		var source = "../../../include/flex/player/Player.swf";
		
		var parameters = {
			key : key,
			dataFile : file
		};
		
		Garmin.FlashUtil.addFlashObject(source, container, parameters, {
		    requiredVersion: {
		        major: 10,
		        minor: 0,
		        revision: 0
		    }
	    });
	}
});

