Results 1 to 16 of 16

Thread: [Resolved] Windows Media Player on web

  1. #1

    Thread Starter
    Hyperactive Member naruponk's Avatar
    Join Date
    Feb 2004
    Location
    Some where in the world
    Posts
    423

    Talking [Resolved] Windows Media Player on web

    Hi,

    I have created Windows Media Player on my site.
    <OBJECT style="Z-INDEX: 101; LEFT: 224px; POSITION: absolute; TOP: 56px" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" VIEWASTEXT>
    <PARAM NAME="URL" VALUE="">
    <PARAM NAME="volume" VALUE="50">
    </OBJECT>

    It works fine.
    But how to change url of Windows Media Player when user selected a url from combo box?
    code below is invalid how to correct this code?

    <script runat="server">
    private void DropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
    {
    A.URL="XXXX";
    }
    </script>


    May someone give me an idea?
    Thanks for advance
    Last edited by naruponk; Mar 23rd, 2005 at 07:36 AM.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Windows Media Player on web

    Code:
    <OBJECT id="wmpobj" style="Z-INDEX: 101; LEFT: 224px; POSITION: absolute; TOP: 56px" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" VIEWASTEXT>
    then use client side javascript, call it in the OnChange event of the dropdown:

    PHP Code:
    wmpobj.URL="file7.wmv"

  3. #3

    Thread Starter
    Hyperactive Member naruponk's Avatar
    Join Date
    Feb 2004
    Location
    Some where in the world
    Posts
    423

    Unhappy Re: Windows Media Player on web

    Thanks mendhak.
    Below is a code that i have edited from a code you gave me.
    I still got an error, what's wrong of my code?
    can you help me to correct this code, if it work then I can do more my self

    VB Code:
    1. <HTML>
    2. <script language="VB">
    3. sub Submit_Click()
    4. wmpobj.URL="D:\Songs\mangosteen_low.wav";
    5. end sub
    6. </script>
    7. <body>
    8. <input name="Submit" type="submit" id="Submit" value="Submit" >
    9. <OBJECT id="wmpobj" style="Z-INDEX: 101; LEFT: 224px;POSITION: absolute; TOP: 56px" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" VIEWASTEXT>
    10. </body>
    11. </HTML>


    Thanks
    Last edited by naruponk; Mar 21st, 2005 at 05:14 AM.

  4. #4

    Thread Starter
    Hyperactive Member naruponk's Avatar
    Join Date
    Feb 2004
    Location
    Some where in the world
    Posts
    423

    Re: Windows Media Player on web

    Attention of above:
    This code was generated on dreamweaver and have no codebehind yet.
    Do I need code behind file?
    Last edited by naruponk; Mar 21st, 2005 at 05:29 AM.

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Windows Media Player on web

    <script language="VBSCRIPT">

  6. #6

    Thread Starter
    Hyperactive Member naruponk's Avatar
    Join Date
    Feb 2004
    Location
    Some where in the world
    Posts
    423

    Re: Windows Media Player on web

    I have changed to VBScript.
    Once I run and press a button IE's statusbar shows "Error on page"
    Do you think what is problem of my code?

    Have you ever try to send a parameter from an aspx to ActiveX?
    If so, how is a result and which script language you used?

    Thanks mendhak
    Last edited by naruponk; Mar 21st, 2005 at 06:38 AM.

  7. #7
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Windows Media Player on web

    What's the error? (Double click it)

  8. #8

    Thread Starter
    Hyperactive Member naruponk's Avatar
    Join Date
    Feb 2004
    Location
    Some where in the world
    Posts
    423

    Smile Re: Windows Media Player on web

    It doesnt shows error description, in the attachment is what i see.
    Can you try above code?


    I have try to use VS.NET to create aspx.
    but in code behind file I cant use wmpobj.properties becuase
    VS told me that class wmpobj cannot be found or something like this.
    If I cant do that using HTML, Can I use code behind file to do that?

    Thanks
    Attached Images Attached Images  
    Last edited by naruponk; Mar 21st, 2005 at 11:43 PM.

  9. #9
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Windows Media Player on web

    Double click it.

  10. #10

    Thread Starter
    Hyperactive Member naruponk's Avatar
    Join Date
    Feb 2004
    Location
    Some where in the world
    Posts
    423

    Question Re: Windows Media Player on web

    This a code in that aspx page
    VB Code:
    1. <HTML>
    2. <script language="VBScript">
    3. sub Submit_Click()
    4. wmpobj.URL="D:\Songs\mangosteen_low.wmv";
    5. end sub
    6. </script>
    7. <body>
    8. <input name="Submit" type="submit" id="Submit" value="Submit" >
    9. <OBJECT id="wmpobj" style="Z-INDEX: 101; LEFT: 224px;POSITION: absolute; TOP: 56px" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" VIEWASTEXT>
    10. </body>
    11. </HTML>
    Attached Images Attached Images  

  11. #11
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Windows Media Player on web

    Quote Originally Posted by naruponk
    This a code in that aspx page
    VB Code:
    1. <HTML>
    2. <script language="VBScript">
    3. sub Submit_Click()
    4. wmpobj.URL="D:\Songs\mangosteen_low.wmv"[color=#CC0000];[/color]
    5. end sub
    6. </script>
    7. <body>
    8. <input name="Submit" type="submit" id="Submit" value="Submit" >
    9. <OBJECT id="wmpobj" style="Z-INDEX: 101; LEFT: 224px;POSITION: absolute; TOP: 56px" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" VIEWASTEXT>
    10. </body>
    11. </HTML>

    Try removing the semicolon.

  12. #12

    Thread Starter
    Hyperactive Member naruponk's Avatar
    Join Date
    Feb 2004
    Location
    Some where in the world
    Posts
    423

    Re: Windows Media Player on web

    No error , but nothing happen (doesnt work) even i changed the command in
    Submit_Click() to Msgbox ("Test"). why i cant access an events?

    Thanks

  13. #13
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Windows Media Player on web

    Let's try something else:

    Code:
    <HTML>
    <script language="JavaScript">
    function PlayIt()
    {
    wmpobj.URL="D:\Songs\mangosteen_low.wmv";
    wmpobj.controls.play();
    }
    </script>
    <body>
    <input name="Submit" type="button" id="Submit" value="Submit" onClick="PlayIt();">
    <OBJECT id="wmpobj" style="Z-INDEX: 101; LEFT: 224px;POSITION: absolute; TOP: 56px" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" VIEWASTEXT>
    </body>
    </HTML>

  14. #14

    Thread Starter
    Hyperactive Member naruponk's Avatar
    Join Date
    Feb 2004
    Location
    Some where in the world
    Posts
    423

    Talking Re: Windows Media Player on web

    Thanks man, works fine!
    Can i do like this with others ActiveX?

  15. #15
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Windows Media Player on web

    Yes, it's possible.

  16. #16

    Thread Starter
    Hyperactive Member naruponk's Avatar
    Join Date
    Feb 2004
    Location
    Some where in the world
    Posts
    423

    Talking Re: Windows Media Player on web

    Thanks a lot for your help
    Last edited by naruponk; Mar 23rd, 2005 at 07:37 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width