I have some html code for a page that has a video included on it. I'm trying to figure out how to make the video automatically play once the page is loaded. Is this possible and if so how?
Here's the code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body{
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="letplayer" width="640" height="360" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
<param name="movie" value="//moevideo.net/swf/letplayer.swf?_=20082014" />
<param name="quality" value="high" />
<param name="allowScriptAccess" value="always" />
<param name="allowFullScreen" value="true" />
<param value="file=23891.2187961fd18487cc66b952ed8992" name="flashvars">
<param name="wmode" value="opaque" />
<embed src="//moevideo.net/swf/letplayer.swf?_=20082014"
quality="high"
bgcolor="#000000"
width="640" height="360" name="letplayer"
align="middle"
play="true"
loop="false"
quality="high"
allowFullScreen="true"
allowScriptAccess="always"
type="application/x-shockwave-flash"
flashvars="file=23891.2187961fd18487cc66b952ed8992"
name="letplayer"
wmode="opaque"
pluginspage="http://www.adobe.com/go/getflashplayer">
</embed>
</object>
</body>
</html>
If've just googled it and found a code with this line:
<embed src="...." play="true" />
In html 'video' tag has the attribute 'controls' , we can set it as 'autoplay'
<video width="320" height="240" controls autoplay>
please refer the link http://edvista.com/claire/qt/embedtags/
<EMBED SRC="juliana.mov" WIDTH="160" HEIGHT= "136" AUTOPLAY="TRUE">
Related
I need display Flash content in my web page. I am developing my web site in WAMP and my PHP version is 2.5
<tr>
<td height="31" align="center" valign="middle"><object type="application/x-shockwave-flash" data="player_mp3_maxi.swf" width="260" height="23">
<param name="wmode" value="transparent" />
<param name="movie" value="player_mp3_maxi.swf" />
<param name="FlashVars" value="mp3=song.mp3&showstop=1&loop=1&autoplay=1&showvolume=1" />
<p>School Anthem</p>
</object></td>
</tr>
Unfortunately it is not displaying SWF file (Flash Player). Only displaying the School Anthem word. How can I fix this problem?
I would just use the <embed> tag (but I never needed flashvars, so may not work for you).
According to this Adobe article your <object> code should look something like :
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="260" height="23" id="myFlashMovie" align="middle">
<param name="movie" value="player_mp3_maxi.swf" />
<param name=FlashVars value="mp3=song.mp3&showstop=1&loop=1&autoplay=1&showvolume=1" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="player_mp3_maxi.swf" width="260" height="23">
<param name="movie" value="player_mp3_maxi.swf" />
<param name=FlashVars value="mp3=song.mp3&showstop=1&loop=1&autoplay=1&showvolume=1" />
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflash">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
If still not working then try a new html page with this <embed>code below :
(Put .html file and swf file together in same place or folder. Does it show anything?).
<!DOCTYPE html>
<html>
<body>
<embed src="player_mp3_maxi.swf" width="800" height="600">
</body>
</html>
can you tell me how to import a game on my website and put it on the middle? please :) and how to make the game screen bigger like armor games.
Here is my website:
http://www.greenpost.esy.es/game.php
and my code is here:
<!doctype>
<html>
<head>
<title>Greenpost's Games</title>
</head>
<body>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="800" HEIGHT="600" id="rocketman" ALIGN="">
<PARAM NAME=movie VALUE="flash/rocketman.swf">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#333399>
<EMBED src="flash/rocketman.swf" quality=high bgcolor=#333399 WIDTH="320px" HEIGHT="240px" NAME="rocketman" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</EMBED>
</OBJECT>
</body>
</html>
Put your object tags in a div and centre that div using css styles.
div {
margin 0 auto;
}
you can wrap your flash object in a div and then give a margin:0 auto and text-align:center for horizontal center or use positon:absolute with left and right for vertical center.
<div id="flash_container">
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="800" HEIGHT="600" id="rocketman" ALIGN="">
<PARAM NAME=movie VALUE="flash/rocketman.swf">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#333399>
<EMBED src="flash/rocketman.swf" quality=high bgcolor=#333399 WIDTH="320px" HEIGHT="240px" NAME="rocketman" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</EMBED>
</OBJECT>
</div>
I am trying to stretch the video that I have. It has to be 400 X 400 stretched. I tried using the "stretchtofit" value="true" but that doesn't work and I need the video centered under the heading. I'm curious as to what I use to stretch the video? This is my code:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Lab 8-3</title>
</head>
<body>
<div style="text-align: center">
<img style="border: 0" src="magiclogo.png" width="325" height="88" alt="Logo" />
</div>
<div style="position: absolute; top: 110px; left: 310px">
<object data="magicshow.wmv" height="400" width="400">
<param name="showcontrols" value="false" />
<param name="stretchtofit" value="true" />
</object>
</div>
<object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6">
<param name="URL" value="magicmusic.mp3" />
<param name="uimode" value="invisible" />
</object>
</body>
</html>
why aren't you using <video> tag. you can set the size easily.
<video width="400" height="400" controls>
<source src="movie.mp4" type="video/mp4">
</video>
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
There is one html page that contains only a .swf file that can be streaming from there:
http://tvoy-start.ru/uroki/1nedel/1nedel.html
Here is that page source:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<!-- saved from url=(0025)http://www.techsmith.com/ -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="DC.date" content="2011-09-15 11:37:43 " />
<meta name="DC.language" content="ENU" />
<meta name="DC.title" content="1nedel" />
<title>Создано Camtasia Studio 6</title>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
swfobject.registerObject("csSWF", "9.0.115", "expressInstall.swf");
</script>
<style type="text/css">
body
{
background-color: #1a1a1a;
font: .8em/1.3em verdana,arial,helvetica,sans-serif;
text-align: center;
}
#media
{
margin-top: 40px;
}
#noUpdate
{
margin: 0 auto;
font-family:Arial, Helvetica, sans-serif;
font-size: x-small;
color: #cccccc;
text-align: left;
width: 210px;
height: 200px;
padding: 40px;
}
</style>
</head>
<body>
<div id="media">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="900" height="420" id="csSWF">
<param name="movie" value="1nedel_controller.swf" />
<param name="quality" value="best" />
<param name="bgcolor" value="#1a1a1a" />
<param name="allowfullscreen" value="true" />
<param name="scale" value="showall" />
<param name="allowscriptaccess" value="always" />
<param name="flashvars" value="autostart=false&thumb=FirstFrame.png&thumbscale=45&color=0x1A1A1A,0x1A1A1A" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="1nedel_controller.swf" width="900" height="420">
<param name="quality" value="best" />
<param name="bgcolor" value="#1a1a1a" />
<param name="allowfullscreen" value="true" />
<param name="scale" value="showall" />
<param name="allowscriptaccess" value="always" />
<param name="flashvars" value="autostart=false&thumb=FirstFrame.png&thumbscale=45&color=0x1A1A1A,0x1A1A1A" />
<!--<![endif]-->
<div id="noUpdate">
<p>The Camtasia Studio video content presented here requires a more recent version of the Adobe Flash Player. If you are you using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Flash Player by downloading here.</p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
<!-- Users looking for simple object / embed tags can copy and paste the needed tags below.
<div id="media">
<object id="csSWF" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="900" height="420" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0">
<param name="src" value="1nedel_controller.swf"/>
<param name="bgcolor" value="#1a1a1a"/>
<param name="quality" value="best"/>
<param name="allowScriptAccess" value="always"/>
<param name="allowFullScreen" value="true"/>
<param name="scale" value="showall"/>
<param name="flashVars" value="autostart=false"/>
<embed name="csSWF" src="1nedel_controller.swf" width="900" height="420" bgcolor="#1a1a1a" quality="best" allowScriptAccess="always" allowFullScreen="true" scale="showall" flashVars="autostart=false&thumb=FirstFrame.png&thumbscale=45&color=0x1A1A1A,0x1A1A1A" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>
</object>
</div>
-->
</body>
</html>
I wonder, where in the page's source, if it’s possible at all, can I find the link so that I could download that .swf file onto my computer?
Yes it's specified as "movie" param under object tag.
You can reach it at http://tvoy-start.ru/uroki/1nedel/1nedel_controller.swf
However, the swf file may have some server side control that doesn't allow you to see streaming if you aren't on that website. Just try.
EDIT: Forgot, you have to save the page, in my browser (firefox) is File->Save page with name
On internet explorer is the engine wheel icon->File->Save as
On other browsers, I don't know at the moment
I am trying to put a 1024x168 flash video(swf) in a web page and but the video is getting clipped, I wish to have scroll bar appear whenever it overflows. Below is my code:
<!DOCTYPE html>
<html>
<head>
test
</head>
<body>
<div style="overflow: auto;">
<object id="M97012085" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%" style="overflow: auto; align:middle;" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0">
<param name="movie" value="path_to_swf" />
<param name="loop" value="false" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="wmode" value="transparent" />
<param name="play" value="false" />
<embed bgcolor="#ffffff" align="middle" name="M97012085 loop="false" src="path_to_swf" width="100%" height="100%" style="overflow: auto; align:middle;" play="false" wmode="transparent" quality="high" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</div>
</body>
</html>
Please advice how can I have the scrollbars appear when video overflows ?
I think by setting the height and width to 100% on your object you are telling it to fill up the whole div, which is why you don't get scrollbars.
Try setting the actual dimensions for the height and width and then when a video's dimensions are larger then the div you should see the scrollbars.