Thread: Embed with manual resize
Results 1 to 3 of 3
Related
-
resize of window Forum: HTML Forum
Replies: 3 -
Need Help To Resize BASIC page-top Calendar... Forum: Javascript Forum
Replies: 2 -
tag to make BG img resize to fit all browsers?? Forum: HTML Forum
Replies: 7 -
html and resize of browser Forum: HTML Forum
Replies: 1 -
resize Forum: HTML Forum
Replies: 4
-
04-07-2004, 12:27 PM #1
Embed with manual resize?
I have a .wmv file I have embedded, is there a way to have it resize to fill the window? ie, if I make the window smaller it shrinks the video, I enlarge the window it expands the video?
Thanks
Mike
-
04-07-2004, 04:01 PM #2bald headed old fart
Status- Offline
Join Date- Aug 2003
Location- chertsey, a small town 25 miles south west of london, england.
Posts- 739
Hi there mike015,
Welcome to these forums
I have added a small 'javascript' and a bit of 'css' to your code. It may not work in all browsers
Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Gimme the Mike</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script type="text/javascript"> //<![CDATA[ function enLarge(){ if (document.getElementById("MediaPlayer").style.width=="100%"){ document.getElementById("MediaPlayer").style.width="300px"; document.getElementById("MediaPlayer").style.height="300px"; } else{ document.getElementById("MediaPlayer").style.width="100%"; document.getElementById("MediaPlayer").style.height="100%"; } } //]]> </script> <style type="text/css"> /*<![CDATA[*/ #one{ position:absolute; top:0; left:0; } #MediaPlayer{ position:absolute; top:30px; left:0; } /*//]]>*/ } </style> </head> <body> <div id="one" ><button onclick="enLarge()"> large · small </button></div> <object id="MediaPlayer" width="300" height="300" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"standby="Loading Microsoft® Windows® Media Player components..." type="application/x-oleobject"codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112"> <param name="filename" value="gimmethemikeweb1.wmv"> <param name="autoStart" value="true"> <param name="showControls" value="true"> <param name="ShowStatusBar" value="true"> <param name="Autorewind" value="true"> <param name="ShowDisplay" value="false"> <embed src="gimmethemikeweb1.wmv" type="application/x-mplayer2" name=MediaPlayer autostart=1 showcontrols=0 showstatusbar=0 autorewind=1 showdisplay=0> </embed></object> </body> </html>
thead
-
04-12-2004, 08:46 AM #3
Thanks, Coothead.
That was a different approach, but equally effective.
It will work well for me.
Thanks
Mike
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum