if (!window.WorkingWithAnimations)
	window.WorkingWithAnimations = {};

WorkingWithAnimations.Scene = function() 
{
}

WorkingWithAnimations.Scene.prototype =
{
	handleLoad: function(plugIn, userContext, rootElement) 
	{
		this.plugIn = plugIn;
		
    this.circle = rootElement.findName("theCircle");
		this.circleAnimation = rootElement.findName("circleAnimation");

		this.circle.addEventListener("MouseLeftButtonUp", Silverlight.createDelegate(this, this.circle_MouseLeftButtonUp));
		this.circleAnimation.addEventListener("Completed", Silverlight.createDelegate(this, this.circleAnimation_Completed));

	},
	
  circleAnimation_Completed: function(sender, args) {
    alert("Circle Animation done");
  },

  circle_MouseLeftButtonUp: function(sender, args) {
    // Call stop first in case its clicked more than once
    this.circleAnimation.stop();
    this.circleAnimation.begin();
  }
}