if (!window.trexchicken)
	window.trexchicken = {};

trexchicken.Scene = function() 
{
}

trexchicken.Scene.prototype =
{
	handleLoad: function(control, userContext, rootElement) 
	{
		this.control = control;
		
		// Sample event hookup:	
		rootElement.addEventListener("MouseLeftButtonDown", Sys.Silverlight.createDelegate(this, this.handleMouseDown));
	},
	
	// Sample event handler
	handleMouseDown: function(sender, eventArgs) 
	{
	    // The following line of code shows how to find an element by name and call a method on it.
	     this.control.content.findName("trex2chicken").Begin();
	}
}

function StartTrex2Chicken(sender, eventArgs)
{

	sender.findName("cluck").Stop();
	sender.findName("cluck").Play();
	sender.findName("trex2chicken").Begin();
}

function StartChicken2Trex(sender, eventArgs)
{
	sender.findName("roar").Stop();
	sender.findName("roar").Play();
	sender.findName("chicken2trex").Begin();

}