Results 1 to 4 of 4

Thread: Load movie into a div

  1. #1
    Join Date
    Oct 2005
    Location
    Netherlands
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Load movie with thumbnail vieuwer

    Does someone know how i can load a movie into a div when i click a link?

    Maybe a little change with javascript from the thumbnail viewer
    I want to use it in combination with images
    Last edited by Jeffb; 10-29-2005 at 02:40 PM.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    If you mean a quicktime .mov, I've done this before. Here is an example link for use with the script you mentioned:

    Code:
    <a onMouseover="document.getElementById('dynloadarea').innerHTML='<iframe src=\'filename.mov\' width=\'300\' height=\'300\' scrolling=\'auto\' frameborder=\'0\'></iframe>'">
            <img src="thumb2.jpg" width="50" height="50"></a>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Oct 2005
    Location
    Netherlands
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    And if its wmv.. (with your code it opens windows media player)
    Can i change the innerhtml ?
    Like
    HTML Code:
    <AREA SHAPE="rect" COORDS="0,256,240,277" HREF="#" onclick="document.getElementById('imglayer').innerHTML='
    <iframe width=\'220\' height=\'220\' scrolling=\'no\' frameborder=\'0\'>
    <embed src=\'mms://stream.2003.02.garnierprojects.com/tmf/music/armin_shivers_512.wmv#0;1.000;0;0;1:2;2:2\' width=\'220\' height=\'220\' type=\'video/x-ms-asf\' autoplay=\'true\' loop=\'false\' volume=\'50\'>
    </embed></iframe>'" ALT="">
    Last edited by Jeffb; 10-29-2005 at 03:42 PM.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    No, you would make up a separate page with the embed code on it, call that page say, movie.htm . Then you could use:

    Code:
    <a onMouseover="document.getElementById('dynloadarea').innerHTML='<iframe src=\'movie.htm\' width=\'300\' height=\'300\' scrolling=\'auto\' frameborder=\'0\'></iframe>'">
            <img src="thumb2.jpg" width="50" height="50"></a>
    Note: With .mov, if you use embed you need to use object/embed code for the movie to play in IE and other browsers (object for IE, embed for others). This may also be true for .wmv, I don't know for sure.

    Here is an example page with object/embed for .mov (the 'saved from' comment line is required for some local IE implementations only):

    Code:
    <html>
    <!-- saved from url=(0014)about:internet -->
    <head>
    <title></title>
    </head>
    <body>
    <object width="160" height="300"
    classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
    codebase="http://www.apple.com/qtactivex/qtplugin.cab">
    <param name="src" value="filename.mov">
    <param name="autoplay" value="true">
    <param name="controller" value="false"><embed src="filename.mov" width="160" height="300"
    autoplay="true" controller="false"
    pluginspage="http://www.apple.com/quicktime/download/">
    </embed></object>
    </body>
    </html>
    A web search should be able to find you one for .wmv if needed.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •