Go Back   CodingForums.com > :: Client side development > Flash & ActionScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-11-2012, 05:02 PM   PM User | #1
boris86
New to the CF scene

 
Join Date: Jun 2012
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
boris86 is an unknown quantity at this point
flash content problem o html

I got a problem with my flash content on my html page. i have centered the content on the html perfectly but when i preview my html with my browser it looks fine on my screen but on a bigger screen with another computer, my flash is centered but too much at the top of the window in the browser.

my problem is to keep the flash content centered on the page with the browser but push it down small to make it look absolute middle on big screen when i preview. can someone help me with a tip?
boris86 is offline   Reply With Quote
Old 06-11-2012, 10:53 PM   PM User | #2
djpaul1963
New Coder

 
djpaul1963's Avatar
 
Join Date: Apr 2012
Location: Athens GR
Posts: 65
Thanks: 0
Thanked 8 Times in 8 Posts
djpaul1963 is an unknown quantity at this point
What are you doing for centering vertically? Can you paste here the html code?
djpaul1963 is offline   Reply With Quote
Users who have thanked djpaul1963 for this post:
boris86 (06-12-2012)
Old 06-12-2012, 09:52 AM   PM User | #3
boris86
New to the CF scene

 
Join Date: Jun 2012
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
boris86 is an unknown quantity at this point
my website is in flash and i put it on a HTML page. i have centered the page horizontally perfectly using <div align="center">. but i have noticed that my flash content is centered perfectly horizontally but not vertically. because on my screen with my browser, the site looks good but on a bigger screen it looks centered horizontally but at the top of the browser. now i want to push it down vertically to make it look in the middle on big screens. thanks a lot. i can post my code here:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>cesig</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css" media="screen">
html, body { height:100%; background-color: #ffffff; background-image:url(http://www.cesig.net/images/background.jpg)}
body { margin:0; padding:0; overflow:show; }
#flashContent { width:100%; height:100%; }
</style>
</head>
<body>
<div id="flashContent">
<div align="center">

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="900" height="600" id="cesig" align="middle">
<param name="movie" value="cesig.swf" />
<param name="quality" value="best" />
<param name="bgcolor" value="#ffffff" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="window" />
<param name="scale" value="exactfit" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="sameDomain" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="cesig.swf" width="900" height="600">
<param name="movie" value="cesig.swf" />
<param name="quality" value="best" />
<param name="bgcolor" value="#ffffff" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="window" />
<param name="scale" value="exactfit" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="sameDomain" />
<!--<![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>
</div>
</div>
</body>
</html>
boris86 is offline   Reply With Quote
Old 06-12-2012, 09:54 AM   PM User | #4
boris86
New to the CF scene

 
Join Date: Jun 2012
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
boris86 is an unknown quantity at this point
the address for the website is www.cesig.net
boris86 is offline   Reply With Quote
Old 06-12-2012, 09:55 AM   PM User | #5
boris86
New to the CF scene

 
Join Date: Jun 2012
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
boris86 is an unknown quantity at this point
i'm not a beginner in webdesign. thanks
boris86 is offline   Reply With Quote
Old 06-12-2012, 11:15 AM   PM User | #6
resin
Regular Coder

 
Join Date: Nov 2011
Posts: 142
Thanks: 5
Thanked 0 Times in 0 Posts
resin is an unknown quantity at this point
If I understand correctly, you want the Flash content centered on the page vertically and horizontally, regardless of the screen resolution? If so, you just need to place all the flash content inside a div and give that div a bit of styling:

1. in your css, remove all styling currently in #flashContent
2. in your html, remove the second div tag ( <div align="center"> ), it is not necessary
3. then in your css, add: #flashContent { position:absolute;left:50%;margin-left:-450px;top:50%;margin-top:-300px; }

Now your Flash content will be centered vertically and horizontally on your page at all times, regardless of screen resolution. Hope this helps!
resin is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 03:07 PM.


Advertisement
Log in to turn off these ads.