Centering a flash website using swf object

  • Dreadart
  • Born
  • Born
  • No Avatar
  • Joined: May 02, 2010
  • Posts: 1
  • Status: Offline

Post May 2nd, 2010, 12:05 pm

Hi guys,

This is driving me nutz. I made a flash website which is a movie (tireslongbeach dot com). I centered the website using dreamweaver and the css method with a div tag on the embed content. After this website was published I wanted to add alternate content for the search engines to be able to crawl the website so using swf object the code for the website looks like this:
--------

<!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></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var flashvars = {};
var params = {};
params.scale = "noscale";
var attributes = {};
swfobject.embedSWF("tiretrax.swf", "altContent", "1000", "1100", "9.0.0", false, flashvars, params, attributes);
</script>
</head>
<body>
<div id="altContent">
<a href="http://www.adobe. com/go/getflashplayer">
<img src="http://www.adobe. com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
</div>
</body>
</html>


----

The question is how to center this website? :( Is it possible to use the css method with this code above? Where would I apply it?

Thanks
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post May 2nd, 2010, 12:05 pm

  • X3ndou
  • Proficient
  • Proficient
  • User avatar
  • Joined: Nov 06, 2004
  • Posts: 263
  • Loc: New Jersey
  • Status: Offline

Post May 2nd, 2010, 12:51 pm

Just add the style attribute margin: auto to some div bounding your content.

http://jsbin.com/eloci/2/edit

Hit 'Preview' at the top.
"On the day *I* go to work for Microsoft, faint oinking sounds will be heard from far overhead, the moon will not merely turn blue but develop polkadots, and hell will freeze over so solid the brimstone will go superconductive." -Eric S. Raymond

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: roelof and 129 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.