Development video object pop up windows

Discussion in 'Software' started by Pballer98c, 20 May 2005.

  1. Pballer98c

    Pballer98c Minimodder

    Joined:
    2 Jan 2005
    Posts:
    454
    Likes Received:
    0
    well i have to add about 30 videos into a windows media player object embedded into a website. There will be a list of the 30 videos and what I want is when you click the link the object will open into a new window. Do I have to make 30 different website pages with the object in it for each video or is there something i can put into the code of the link? thanks.... and here is the code i will be using for popup
    Code:
    <a href="http://www.yourweblog.com/yourfile.html" onclick="window.open('http://www.yourweblog.com/yourfile.html','popup','width=300,height=300,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false">About</a>
    and here is the code for the object
    Code:
    <OBJECT ID="MediaPlayer" WIDTH="192" HEIGHT="190" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
    STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">
    <PARAM NAME="FileName" VALUE="/hs/videos/0405/ww5-6-05.wmv">
    <PARAM name="ShowControls" VALUE="true">
    <param name="ShowStatusBar" value="false">
    <PARAM name="ShowDisplay" VALUE="false">
    <PARAM name="autostart" VALUE="false">
    <EMBED TYPE="application/x-mplayer2" SRC="/hs/videos/0405/ww5-6-05.wmv" NAME="MediaPlayer"
    WIDTH="192" HEIGHT="190" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0"> </EMBED>
    </OBJECT>
    thanks again
     
  2. Nath

    Nath Your appeal has already been filed.

    Joined:
    28 Dec 2003
    Posts:
    2,409
    Likes Received:
    1
    Yup it's dead easy to do, if you use a scripting language (easiest for me is PHP).

    What you have to do:

    1) Change the media player popup file to .php instead of .html. Simply a case of changing the extension. I'm not exactly sure whether PHP can be parsed in an HTML file so I'd just be safe and do it.

    2) To the media player popup file, add this code at the top:

    PHP:
    <?php
    $videos
    = array(
    0=> "/hs/videos/0405/ww5-6-05.wmv",
    1=> "/hs/videos/0405/ww5-2-92.wmv",
    2=> "/hs/videos/0405/ww18293719.wmv" );
    $videotoplay=$videos[$_GET['vid']];
    ?>
    Then in the bit where you have your src="", place this code:

    PHP:
    <?php
    echo $videotoplay;
    ?>
    inside the quotes....

    edit: crap forgot something, with your links, if you want "/hs/videos/0405/ww5-6-05.wmv" as the video that plays, put your link as:

    <a href="http://www.yourweblog.com/yourfile.php?id=0" onclick="window.open('http://www.yourweblog.com/yourfile.php?id=0','popup','width=300,height=300,scrol lbars=no,resizable=no,toolbar=no,directories=no,lo cation=no,menubar=no,status=no,left=0,top=0'); return false">About</a>

    Good luck! :thumb:
     
  3. Pballer98c

    Pballer98c Minimodder

    Joined:
    2 Jan 2005
    Posts:
    454
    Likes Received:
    0
    x
     
    Last edited: 16 Apr 2021
  4. Nath

    Nath Your appeal has already been filed.

    Joined:
    28 Dec 2003
    Posts:
    2,409
    Likes Received:
    1
    No problem mate, but I don't know how to do it in HTML, sorry. :blah:
     
  5. Go4t

    Go4t i

    Joined:
    13 Dec 2003
    Posts:
    939
    Likes Received:
    1
    i think the best choice would be to wait for the tech guy to install php since it would be a pain to do all the pages for each individual video

    and blue you can set php to parse .html files too but its simpler to just change to .php
     
  6. [Jonny]

    [Jonny] What's a Dremel?

    Joined:
    1 Sep 2003
    Posts:
    296
    Likes Received:
    0
    You "could" use javascript for this. If you do somthing like what I have done with my popup images, but replace the image code with your movie code, then it should work well.

    You can see it in action here: http://www.jonsully.co.uk/blog.php
    You can find the script here: http://www.jonsully.co.uk/jonsully.js (function enlargeimage() and shrinkimage())


    You would just want to this into the flash stuff rather than the image tag:

    Code:
      box.innerHTML='<div id="porthumbtext">Click image to close (<a href="attachments/'+bigimage+'">view in browser</a>)</div><a href="#shrinkimage" onclick="shrinkimage();"><img name="enlargedimage" id="enlargedimage" src="attachments/'+ bigimage +'" alt="Enlarged Image"></a>';
    If you need any help I can write it for you or sth. :p
     
  7. Pballer98c

    Pballer98c Minimodder

    Joined:
    2 Jan 2005
    Posts:
    454
    Likes Received:
    0
    wow thanks... will definetly give that a try this weekend and let you know how it works. thats exactly what i was looking for. thanks
     

Share This Page