all groups > macromedia flash sitedesign > november 2004 >
You're in the

macromedia flash sitedesign

group:

how to make the movie centered ?


how to make the movie centered ? _EnergiE_
11/13/2004 6:44:21 PM
macromedia flash sitedesign: I couldn't make it my movie to appear centered in the browser window.At the
export options I've checked for "dimensions":match movie and for"html
alignment":default ,and "flash alignment":horisontal&vertical:center but it
appears in the upper left corner of the browser :( I don't want to make it
"dimensions":pixels because it's a pretty small movie and doesn't look good
that way.
Could someone help me with that problem please ?
Here's the site: http://ultrasmiley.hit.bg
Thanks everybody!!! :)
Re: how to make the movie centered ? proxmaster
11/13/2004 9:19:12 PM
You can modify the html code to center your flash object in the browser window.
Add a <center> tag before the flash object tag and </center> after the closing
</object> tag.
You could also use: <div align="center"> & </div> instead of:
<center>&</center>
Modify mySite8_content.html:

<center>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve
rsion=7,0,0,0" width="600" height="400" id="ultrasmiley" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="ultrasmiley.swf" />
<param name="menu" value="false" />
<param name="quality" value="high" />
<param name="devicefont" value="true" />
<param name="bgcolor" value="#657181" />
<embed src="ultrasmiley.swf" menu="false" quality="high" devicefont="true"
bgcolor="#657181" width="600" height="400" name="ultrasmiley" align="middle"
allowScriptAccess="sameDomain" type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</center>
Re: how to make the movie centered ? _EnergiE_
11/14/2004 1:18:45 PM
yeah that's better
it appears in the top center of the browser window.Isn't there any chance to
make in the absolute center?
What about this javascript to open the index.html :
<html>
<head>
<title>ZooMX</title>
<script language="javascript">
<!--
function launchWin(url, name, winW, winH) {
var winleft = (screen.width - winW) / 2;
var wintop = (screen.height - winH) / 2;
features = 'width='+winW+',height='+winH+',left='+winleft+',top='+wintop;
popup = window.open(url, name, features)
if (parseInt(navigator.appVersion) >= 4) { popup.window.focus(); }

}
// -->
</script>

</head>
<body bgcolor="//any color"
onLoad="launchWin('index.html','ultrasmiley','600','400');return false;">
</body>
</html>
?? Thanks!!!
Re: how to make the movie centered ? proxmaster
11/14/2004 5:12:08 PM
Okay, then the easiest way to accomplish this is to use put your flash object
in a table. This will center the flash object both ways, even when resizing
your browser window.

<table width="100%" height="100%">
<tr>
<td valign="center" align="center">

<object classid="clsid27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve
rsion=7,0,0,0" width="600" height="400" id="ultrasmiley" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="ultrasmiley.swf" />
<param name="menu" value="false" />
<param name="quality" value="high" />
<param name="devicefont" value="true" />
<param name="bgcolor" value="#657181" />
<embed src="ultrasmiley.swf" menu="false" quality="high" devicefont="true"
bgcolor="#657181" width="600" height="400" name="ultrasmiley" align="middle"
allowScriptAccess="sameDomain" type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

</td>
</tr>
</table>
Re: how to make the movie centered ? _EnergiE_
11/14/2004 9:09:41 PM
Re: how to make the movie centered ? proxmaster
11/14/2004 10:03:40 PM
I have tested your page and the problem lies with the DTD (Document Type
Definitions) it is the top line in your html page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

This is a new problem that I have never encounterd before.

Remove this line and it works fine. You don't need this line of code and it
will not effect anything else in your page.
Re: how to make the movie centered ? _EnergiE_
11/14/2004 10:12:50 PM
OK proxmaster Thanks for the advices!! :)
Now I used a simple trick which could be some temporary decision I wrote two
paragraphs with the background color so they arent seen in the browser.It works
good if the resolution is between 800x600 and 1152x864. I'll try your
suggestion,hope it'll look well at any resolution.
Thanks again!!
Re: how to make the movie centered ? _EnergiE_
11/15/2004 5:17:37 PM
Re: how to make the movie centered ? FLGator
2/25/2005 2:29:03 PM
Re: how to make the movie centered ? Eric Herlitz
2/28/2005 10:52:25 PM
<table align=center width=100% height=100%>
<tr>
<td valign=middle> -Put your flash object here- </td>
</tr>
</table>

Make sure to delete any lines with xml or w3 compatibility (usually in the
top of the html page). They will for sure scr*w any alignements up.


[quoted text, click to view]

Re: how to make the movie centered ? FLGator
3/1/2005 1:13:42 PM
That's weird, the plugin from Echange works perfectly with Firefox....it
centers the flash movie from side to side and top to bottom. When I open the
same page with Internet Explorer it didn't center the movie from top to bottom.
AddThis Social Bookmark Button