Results 1 to 3 of 3

Thread: How do I...? create a music pop-up

  1. #1
    hugoharding's Avatar its changed since 02
    Join Date
    Dec 2002
    Location
    London
    Age
    37
    Posts
    296
    Hi,

    I'm making my band's website and I was wondering if anyone can tell me how I can make a simple way of a new window opening when the link is clicked, with one of those sort of mini WMP things in where it can play a mp3.

    Cheers,
    Hugo.

  2. Internet, Programming and Graphics   -   #2
    sparsely's Avatar °¤°¤°¤°¤°¤°¤°
    Join Date
    Dec 2002
    Location
    static hum
    Posts
    3,486
    okay, two seperate things.
    first you need to make the pop-up funtion.

    something like this in your <head> will work
    HTML Code:
    <script type="text/javascript">
    	function popUp(URL) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,men  ubar=0,resizable=1,width=210,height=210');");
    }
    </script>
    in that script, there are some obvious parameters that you can modify to resize the pop-up window, adjust the dimensions, etc.

    then you want to be able to make a link cause the pop-up to open, so a link would work like this
    HTML Code:
    <a title="Listen" href="javascript:popUp('m.html')">Listen</a>
    last, on the page that's going to open the file, you would use a code similar to this, in order to actually play the file in the browser.
    HTML Code:
    <object id="Player"
      classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
      <param name="url" value="some.wav" />
      <param name="autostart" value="true" />
    </object>
    I've attached the quick & dirty example files.
    Attached Files Attached Files

    this post is guaranteed 100% parrot-free

  3. Internet, Programming and Graphics   -   #3
    hugoharding's Avatar its changed since 02
    Join Date
    Dec 2002
    Location
    London
    Age
    37
    Posts
    296
    Cheers mate,

    It's in the 'Music' section at:

    http://www.whistler.tz4.com

    if you want to check it out.

    Hugo.

Bookmarks

Posting Permissions

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