Again, 3 hours wasted due to my ignorance. Today I decided to try some Silverlight for the first time for the model's main page and replace the little Flash video. I'm posting this to REMIND myself to use "markerReached" from a .wmv file encoded by Expression Media Encoder. Code as follows:

Page.xaml.js

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

SL_Promo_Models.Page = function()
{
}

SL_Promo_Models.Page.prototype =
{
    handleLoad: function(control, userContext, rootElement)
    {
        this.control = control;

        this.PlayActionStart = control.content.findName("PlayActionStart");

        this.movie = control.content.findName("IntroVid1");
        this.movie.AddEventListener("markerReached", Silverlight.createDelegate(this, this.handleAction));
    },
handleAction: function(sender, eventArgs)
{
    if (eventArgs.marker.text == "ActionStart")
    {
        this.PlayActionStart.Begin();
    }
}
}



Now if I end up spending 3 hours on the same issue again, I won't be able to use "ignorance" as an excuse.

Blog Tags: