...

View Full Version : targeting win. media player across layers



Zimma
07-09-2002, 05:58 PM
I am trying to target a page containing windows media from a different layer with custom controls (instead of the horrible windows ones). i have a function that is called by the button that accesses the payer like so

function ShutMeDown ()
{
top.video.NSPlay.controls.stop();
}

the frame is called video and i have tried loading blank pages into this to check the referance works which it does ...

The embedded WM players ID'd as "NSPlay"

i got the control function direct from the MicroSoft site so it should work (see below).

function ShutMeDown ()
{
Player.controls.stop();
}


I'm fairly new to this DOM lark and my Jscript is pretty poor to (but hey i'm a flash developer and actionscript is a little easier on the heed)

Could anyone enlighten me as to what i'm doing wrong i get a 'this is not an object' error message.

Thanks

James

adios
07-09-2002, 11:58 PM
You'll need to be more specific about the structure of the document - and what browser(s) it's not working in. Except for Netscape 4, there really is no such structure as a 'layer', so your referencing needn't include it. This sometimes helps:

top.video.document.NSPlay.controls.stop();

Zimma
07-10-2002, 10:16 AM
ahh...

i am actually using 'iframes' if that helps. I'll post the url up so you can see what i;m trying to achieve.

http://www.lewislive.co.uk/eventsite/ir/archived_broad/

basically if you click 'life as a man' link (none of the others work) it starts playing the video in the iframe ID'd "video". I am trying to get the buttons below to control the player (i will replace them for my custom ones when it is working). currently i;m only interested in IE browsers tho will include netscape 6 at a later date. Hope that helps.

PS

If you click the monkey see link it writes monkey do into the iframe ID'd "video". therefore i assume that it is the actual reference to the object of the player that doesn't work

Thanks

James



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum