Forum Moderators: open

Message Too Old, No Replies

frame around swf movies

undesired frame around swf movies when displayed in browser

         

mclethe

9:38 am on Jul 21, 2006 (gmt 0)

10+ Year Member



Hello everybody,

When I display my swf-movies, in the browser I have always un undesired phenomene: A sort of frame appears around which disappears only when the visitor clicks in the screen.
Is there some possibility to get rid of this?

Thanks in advance,

mcLethe

jay5r

12:37 pm on Jul 21, 2006 (gmt 0)

10+ Year Member Top Contributors Of The Month



Search Google for SWFObject. It solves that problem and a few others and it's too hard to implement. Basically you build the HTML version of your page, put the section inside a <div> tag and then call SWFObject to replace the contents inside the <div> tag with the Flash movie. If the person doesn't have the correct version of Flash, they get the HTML version of your page...

mclethe

2:50 pm on Jul 21, 2006 (gmt 0)

10+ Year Member



Thank you very much.

mclethe

7:00 pm on Jul 21, 2006 (gmt 0)

10+ Year Member



Hi again,

I tried to adapt the script but not very experienced in adapting scripts I must make an error somewhere. It doesn't open to the movie. Could you give me a hint?

<BODY bgcolor="#FFFFFF" marginwidth="0" marginheight="0" leftmargin="0" topmargin="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td align="Center" valign="Middle">
<title></title>
<script type="text/javascript" src="swfobject.js"></script>
<style type="text/css">

body {
background-color: #eeeeee;
font: .8em/1.3em verdana,arial,helvetica,sans-serif;
}

#info {
width: 300px;
overflow: auto;
}

#flashcontent {
border: solid 1px #000;
width: 300px;
height: 300px;
float: left;
margin: 15px 20px;
}

</style>
</head>
<body>
<div id="#flashcontent">
</div>

<script type="text/javascript">

var so = new SWFObject("http://www.site.com/movie.swf", "movie", "300", "300", "6", "#FF6600");
</script>
</td>
</tr>
</table>

I don't know what is wrong! Or must I maybe replace by "class"?
As I understood also, this is a script not a program to configure first on my system?

jay5r

7:12 pm on Jul 21, 2006 (gmt 0)

10+ Year Member Top Contributors Of The Month



First, a couple little observations...

I'd go with <div id="flashcontent"> rather than <div id="#flashcontent">, and "http://www.site.com/movie.swf" can be reduced to "/movie.swf".

But the critical thing your missing is the line

so.write("flashcontent");

which should go write after the line "var so = new..." (notice I took out the # before flashcontent).

Without so.write nothing will happen.

mclethe

4:04 pm on Jul 25, 2006 (gmt 0)

10+ Year Member



Hi,

What a lack of progress! You won't wrap it.. Doing this I get a grey page with a black frame around and a light red color in it - but not my beloved movie.
No matter the level of the flash player, by the way.
By the way, work on unix/fedora..
Question: the content of the var has to be declared maybe?

Hope you'll hint on,
thanks a big,
mcLethe

body {
background-color: #eeeeee;
font: .8em/1.3em verdana,arial,helvetica,sans-serif;
}

#info {
width: 300px;
overflow: auto;
}

#flashcontent {
border: solid 1px #000;
width: 300px;
height: 300px;
float: left;
margin: 15px 20px;
}

</style>
</head>
<body>
<div id="flashcontent">
</div>

<script type="text/javascript">

var so = new SWFObject("movie.swf", "movie", "300", "300", "5", "#FF6600");
so.write("flashcontent");
</script>

</body>
</html>