Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Centering SWF file behaving differently in IE & FF
Old 10-19-2010, 05:17 AM Centering SWF file behaving differently in IE & FF
Banned

Posts: 408
Name: mushget
Trades: 0
Hi All,

I've managed to center my movie, horizontally and vertically, both in IE and FF.

I've noticed though that by changing the scale from noscale to exactfit, it changes the way it shows up on both browsers. Can someone please explain to me why?
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
   <head>
      <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
      <title>How to embed movies right bang in the middle of browser</title>
 
      <style type="text/css">
         html {
	        height:100%; /* fix height to 100% for IE */
	        max-height: 99%; /* fix height for other browsers */
	        padding: 0; /* remove padding */ 
	        margin: 0;  /* remove margins */
	        border: 0;  /* remove borders */
	        background: #ffffff; /*color background - only works in IE */
	        overflow: hidden; /*get rid of scroll bars in IE */
	        overflow-y: hidden;
	        overflow-x: hidden;
         }
         body {
	        height: 100%; /* fix height to 100% for IE */
	        max-height: 99%; /* fix height for other browsers */
	        padding: 0; /* remove padding */ 
	        margin: 0;  /* remove margins */
	        border: 0;  /* remove borders */
            hide overflow: hidden; /* from IE5/Mac */ 
			overflow: hidden; /*get rid of scroll bars in IE */
	        overflow-y: hidden;
	        overflow-x: hidden;
         }

      </style>

   </head>


   <body bgcolor="#ffffff" leftmargin="500" topmargin="0" marginwidth="0" marginheight="0" scroll="no">

      <table width="100%" height="100%" align="center" valign="middle" border="0" cellpadding="0" cellspacing="0">
      <tr> <td width="100%" height="100%" align="center" valign="middle"> 

      <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
              codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" 
              width="75%" 
              height="100%"
              align="middle">
              
      <param name="movie" value="home.swf">
      <param name="quality" value="high">
      <param name="menu" value="false">
      <param name="scale" value="noscale">
 
      <embed src="home.swf" 
             width="75%" 
             height="100%" 
             align="middle"
             scale="exactfit"
             quality="high" 
             menu="false"  
             pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" 
             type="application/x-shockwave-flash"> 
      </embed>

      </object>

      </tr></td></table>
   </body>
   </center>
</html>
If I run the code in IE, it centers the swf file vertically and horizontally. When I resize the window, the movie doesnt resize itself.

If I run the code in FF, it centers the swf file horizontally. When I resize the window, the movie resizes itself also.

When I set the scale to exactfit, on both browsers the swf will stretch to the browser's viewing area and behaves similarly - by that I mean when I resize the window, the movie will resize too.

I actually want it to behave so that it is horizontally centered and when the movie is resized, the movie doesnt resize itself. If that makes sense?

Can someone please help me understand why it behaves differently and how to go about getting consistency?
mushget is offline
Reply With Quote
View Public Profile Visit mushget's homepage!
 
 
Register now for full access!
Old 10-19-2010, 05:52 AM Re: Centering SWF file behaving differently in IE & FF
Kelpie's Avatar
Skilled Talker

Posts: 82
Name: Andrew
Location: SW Scotland
Trades: 0
To prevent it resizing, give it a fixed width and height (px), instead of fluid (%), with exactfit, showall, or noborder scale, depending on how you want it to appear
Kelpie is offline
Reply With Quote
View Public Profile
 
Old 10-20-2010, 10:49 PM Re: Centering SWF file behaving differently in IE & FF
Novice Talker

Posts: 4
Name: Nordica
Trades: 0
Yes, you can try to give it a fixed width and height, then it will not change.
__________________

Please login or register to view this content. Registration is FREE
§
Please login or register to view this content. Registration is FREE
§
Please login or register to view this content. Registration is FREE
§
Please login or register to view this content. Registration is FREE
Nordica is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Centering SWF file behaving differently in IE & FF
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.23726 seconds with 12 queries