Embedding .swf files on an .html page - html

I've built an intro page for my website (it's a .swf file) and I'm trying to embed it into an .html file, but the html code won't allow me to resize the file (I want the file to take up the whole page, so I tried resetting the height and width parts of the object tag to 100% - it didn't work)
someone told me that the best way to resize the file would be by using javascript. How would I do this?
the code is as follows:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="550" height="400" id="intro to elianas website" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="intro.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#1C140D" />
<embed src="intro.swf" quality="high" bgcolor="#1C140D" width="100%" height="100%" name="intro" align="center" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

You also need to provide the height and width for the Object as well.
<object width="100%" height="100%">
<param name="movie" value="file.swf">
..
<embed src="intro.swf" width="100%" height="100%" />
</object>

Seems like an inactive post but just in case someone looking for a solution stumbles upon this, here is the solution:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/
cabs/flash/swflash.cab#version=6,0,40,0"
width=100% height=100% id="intro">
<param name="movie" value="sample.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#1C140D" />
<embed src="/path/to/sample.swf" quality="high" bgcolor="#1C140D"
width=100% height=100% name="intro" align=""
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer">
</embed>
</object>
Note:
Don't define the width and height parameters in double quotes (when using %)
This technique will not work for XHTML, <embed> can't be within <object>
tag

Here is a short and to the point tut about embedding swf in html:
http://www.tizag.com/flashTutorial/flashhtmlcode.php

Use CSS to increase the page width and height of your body and html tags
<style type="text/css">
html,body {
height:100%;
width:100%;
}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
</style>
I had a similar issue with a full page flash file, where firefox wouldn't display the flash and chrome displayed it with a limited height towards the top of the page.

Related

How to put a flash or .swf on the middle?

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>

How can I put a line frame around an embedded video on Weebly?

I am embedding a video from my screencast.com account into my weebly website.
I am using the HTML appended at the bottom of this posting.
It is appearing with a thin border line on all sides except the right hand side.
You can see it here, its the second video down on the right hand side of this page:
http://www.themathstutor.ie/home-temp.html
I have tried making more physical space in the web page for it, but that does not seem to be the reason.
Can I put something in the HTML to put a thin line around the whole thing?
I have tried putting in different dimensions in the HTML, and sometimes I get the border on the RHS, but never all 4 at the same time.
Can someone advise please?
<!-- copy and paste. Modify height and width if desired. -->
<object id="scPlayer" width="320" height="180" type="application/x-shockwave-flash" data="http://content.screencast.com/users/TheMathsTutor/folders/Default/media/b08282c8-3f04-415c-b6c6-8465331e96ca/scplayer.swf" >
<param name="movie" value="http://content.screencast.com/users/TheMathsTutor/folders/Default/media/b08282c8-3f04-415c-b6c6-8465331e96ca/scplayer.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#FFFFFF" />
<param name="flashVars" value="thumb=http://content.screencast.com/users/TheMathsTutor/folders/Default/media/b08282c8-3f04-415c-b6c6-8465331e96ca/FirstFrame.jpg&containerwidth=320&containerheight=180&autohide=true&autostart=false&loop=false&showendscreen=true&showsearch=true&showstartscreen=true&tocdoc=float&xmp=sc.xmp&content=http://content.screencast.com/users/TheMathsTutor/folders/Default/media/b08282c8-3f04-415c-b6c6-8465331e96ca/IntroVideoV5.mp4&blurover=false" />
<param name="allowFullScreen" value="true" />
<param name="scale" value="showall" />
<param name="allowScriptAccess" value="always" />
<param name="base" value="http://content.screencast.com/users/TheMathsTutor/folders/Default/media/b08282c8-3f04-415c-b6c6-8465331e96ca/" />
<iframe type="text/html" frameborder="0" scrolling="no" style="overflow:hidden;" src="http://www.screencast.com/users/TheMathsTutor/folders/Default/media/b08282c8-3f04-415c-b6c6-8465331e96ca/embed" height="180" width="320" >
</iframe>
</object>
Wrap your code in a div and set a border to 1 pixel.
<div style="border:1px solid black;width:320px;height:180px;">
<!-- your code -->
</div>

Issue with flash video size in html

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.

How do you initialize a full-window Flash object in Google Chrome?

I have a simple HTML file which embeds a Flash file. On the page styling I have a #flashContent with width:100% and height:100%; the Flash object itself has width="100%" and height=100% and is inside a div with id="flashContent". The idea is to make the Flash object (which is a game) to fill the whole browser window even as it resizes.
This works with no problems on IE and Firefox, but there is a small problem on Chrome. About 90% of the time when the page first loads all that is shown is black (the page's background color). The game only appears if the user resizes the window; from then on out it works correctly.
I'd like to ask if there is anything I am doing wrong or if there is an workaround to ensure the Flash game appears correctly on the Chrome browser.
http://reisio.com/examples/fullflash/
<!doctype html>
<html>
<head>
<title></title>
<style>
* {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow: hidden;
}
</style>
</head>
<body>
<div>
<object
data="Flash.swf"
type="application/x-shockwave-flash"
width="400"
height="300">
<param
name="movie"
value="Flash.swf">
</object>
</div>
</body>
</html>
Try using exact (or very big) length for the height, not percents. I had similar problem and I solved it by indicating exact height instead of 100%
but I also use AC_FL_RunContent(...), and in my case the actual height generation was happening there, and there is actually where I had to set the height and for some reason it wasn't setting it to 100% in Chrome. Other browsers work fine though. Below is the code:
<script>
AC_FL_RunContent(
"src", "flash/ConstructionKit03",
"width", "100%",
"height", "740",
"align", "middle",
"id", "ConstructionKit03",
"quality", "high",
"bgcolor", "#869ca7",
"name", "ConstructionKit03",
"flashvars",'historyUrl=history.htm%3F&lang=<%=userLanguage%>&initialUrl=<%=workflow_url%><%=(!edit.equals("") ? "&initialState=editable" : "" )%>&lconid=' + lc_id + '',
"allowScriptAccess","sameDomain",
"type", "application/x-shockwave-flash",
"pluginspage", "http://www.adobe.com/go/getflashplayer"
</script>
<object id="ConstructionKit03" width="100%" height="740"
codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
<param name="movie" value="ConstructionKit03.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#869ca7" />
<param name="allowScriptAccess" value="sameDomain" />
<embed src="flash/ConstructionKit03.swf" quality="high" bgcolor="#869ca7"
width="100%" height="740" name="ConstructionKit03" align="middle"
play="true"
loop="false"
quality="high"
allowScriptAccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/go/getflashplayer">
</embed>
</object>

flash/html, how to embed a flash movie so that it scales with the browser window

i would like to show my flash movie in a browser window so that it fills width and height as good as possible without distorting the movie.
when i use the width and height attribute to the object/embed tags it only scales the width but not the height.
<body bgcolor="#000000"
width="100%"
height="100%">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"
width="100%"
height="100%"
align=""
id="slot">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<param name="movie" value="..." />
<param name="quality" value="high" />
<param name="width" value="100%" />
<param name="height" value="100%" />
<embed src="..."
width="100%" height="100%" quality="high" align="middle" allowScriptAccess="always" allowFullScreen="true" wmode="opaque" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</body>
I think you just need to add some CSS to the HTML page:
html, body { height: 100% }
It should work is youset the width and height to 100%. Then set the scalemode to showAll, that should prevent the movie from distorting.
Then you could of course set the css padding and margin of the html body to 0px the get the most area of the window.
Use swffit. It resizes flash when the browser window is changed.