Rank: Newbie Groups: Member
Joined: 4/16/2010 Posts: 3 Points: 9 Location: USA
|
I have the following code at the bottom of my page.
<script type="text/javascript"> ASPNetMedia.FlashVideo("FlashVideo1").OnProgress = function(object, position) { document.getElementById('<%= Label5.ClientID %>').innerHTML =position; sequence(position); // Function is located in content page. }
ASPNetMedia.FlashVideo("FlashVideo1").OnFinish = function(object, position) { document.getElementById('<%= btNext.ClientID %>').disabled = false; document.getElementById('<%= btNext.ClientID %>').style.backgroundColor = "#000099"; } </script>
The OnProgress function works just fine, I never have problems with it. However, the OnFinish function seems to only work occasionaly. Sometimes it works with a particular video then the next time I run the same video, the function fails. Some videos will execute the code often and other videos will rarely, if ever, execute the code. What am I missing? Thank you, Brian
|
Rank: Administration Groups: Administration
Joined: 7/26/2007 Posts: 676 Points: 1,728 Location: USA
|
Will look into the issue. In teh mean time - can you work around with: Code:OnStop (object, position) Checking of position is close to or at the end of the file? (GetDuration ()) http://www.aspnetflashvideo.com/ASPNetFlashVideo/documentation/?help=ASPNetFlashVideo_JavaScript_API http://www.aspnetmedia.com
|
Rank: Newbie Groups: Member
Joined: 4/16/2010 Posts: 3 Points: 9 Location: USA
|
Sorry, I just realized I posted this in the wrong forum. It should be in the FlashVideo forum.
I did try to use GetDuration but to be honest I find the SDK very vague and was not able to figure out how to incorporate this is an manner that would work. I would need to assign the duration to a variable in JavaScript to compare to actual position. What is the proper way of doing this without using a button as shown in the SDK?
Thanks for your help.
Brian
|