How to create a animation in Blend 2 RRS feed

  • Question

  • Hi guys!
    I have a question...
    I have created a Silverlight site, and created a animation (and installed the Silverlight), but the animations is not played in the Internet Explorer and Firefox.

    Help Me! And sorry for my bad english!! ^^ 
    Thursday, October 2, 2008 4:44 AM


  • Hi axys,

    I believe you didn't specify an event to trigger the created animation (which is stored as a storyboard). You need to explicitly tell your project when to trigger that animation. If its a Silverlight 1 project, refer to the Page.xaml.js file and modify the code there, which comments clearly state what you should do, which is something like this:

    SilverlightSite1.Page.prototype =
        handleLoad: function(control, userContext, rootElement)
            this.control = control;
            // Sample event hookup:   
            rootElement.addEventListener("MouseLeftButtonDown", 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("Storyboard1").Begin();

    All you need to do is modify the bolded codes.

    To learn more, head to http://silverlight.net/Learn/ which has loads of tutorials on creating Silverlight applications.

    Hope this helps :)

    Monday, October 6, 2008 7:50 AM