Current location: Hot Scripts Forums » General Web Coding » JavaScript » [SOLVED] Windows Media Player events problem


[SOLVED] Windows Media Player events problem

Reply
  #1 (permalink)  
Old 03-26-09, 11:20 AM
Shto Shto is offline
Newbie Coder
 
Join Date: Aug 2008
Location: Eindhoven, NL
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
[SOLVED] Windows Media Player events problem

Hi.

I'm working with a Windows Media Player Object that's embedded in my webpage.

On the Microsoft reference site for this object it gives a lot of properties and methods and events.

They define events like this:

<SCRIPT LANGUAGE = "JScript" FOR = Player EVENT = playStateChange(NewState)>

Which gives me problems in Visual Studio, as I guess the <script> tag does not accept attributes like "for" or "event" anymore.

Any ideas how this should be translated into recent JavaScript? Like maybe some Player.playStateChange(NewState) or something like that?

Here's the link to their page:

http://msdn.microsoft.com/en-us/libr...62(VS.85).aspx

Thanks a bunch!

Cheers.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 03-30-09, 09:21 AM
Shto Shto is offline
Newbie Coder
 
Join Date: Aug 2008
Location: Eindhoven, NL
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Solution

Uh...yeah, so I figured it out and just thought I'd share the solution. Maybe someone else has the same problem.

First I had to get Windows Media Player 11, since that is the one that supports all the latest things and so on.

Then make a function that looks like this (this is for Firefox):

Code:
function OnDS<event name>Evt(<event parameters>)
{
}
So, for example:

Code:
function OnDSPlayStateChangeEvt(NewState)
{
}
Whatever is inside that function responds when the event occurs. In this case, when the state of the video changes.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Media Player Javascript Status Bar sixflagsga JavaScript 3 02-04-06 06:20 PM
Windows Media Player on Site HopesDespair Script Requests 0 05-27-05 01:24 AM


All times are GMT -5. The time now is 01:45 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.