Vimeo and Youtube Players in Medusa

Vimeo and Youtube Players in Medusa

How to use media players from the media package in Medusa:

VIMEO

This movie requires Flash Player 9

package
{
	import com.medusa.core.extension.SpriteExtension;
	import com.medusa.media.VimeoPlayer;

	[SWF(width='550', height='300')]
	public class MedusaSandbox extends SpriteExtension
	{

		public function MedusaSandbox()
		{
			var vimeo:VimeoPlayer;
			vimeo = new VimeoPlayer();
			vimeo.setSize(550, 300);
			addChild(vimeo);
			vimeo.load("7809605");
		}	

	}
}

YOUTUBE

This movie requires Flash Player 9

package
{
	import com.medusa.core.extension.SpriteExtension;
	import com.medusa.media.YoutubePlayer;
	import com.medusa.media.events.YoutubeEvent;

	[SWF(width='550', height='300')]
	public class MedusaSandbox extends SpriteExtension
	{
		private var youtube:YoutubePlayer;

		public function MedusaSandbox()
		{
			youtube = new YoutubePlayer(550, 300);
			youtube.addEventListener(YoutubeEvent.READY, handleReady);
			addChild(youtube)
		}	

		private function handleReady(e:YoutubeEvent):void
		{
			youtube.cueVideo("qEe1OPVsYBs");
		}

	}
}

Popularity: 13% [?]

About the Author

I have been in the Flash/Flex industry for approximately 8 years now. Although for the last year I have been mainly creating websites, I’m now more into social media applications (Facebook, Twitter), both online and offline (Adobe AIR), website and RIA framework development on which sites and/or applications are built which includes features like, but not limited to, deep linking integration and high levels of customizability through XML (CMS ready) and backend communication via web services and/or AMF.