Web Analytics Made Easy -
StatCounter targeting win. media player across layers - CodingForum

Announcement

Collapse
No announcement yet.

targeting win. media player across layers

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • targeting win. media player across layers

    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

  • #2
    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();

    Comment


    • #3
      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

      Comment

      Working...
      X