HTML - Swfobject Help
For my website, there is a swf that plays on the home page. The problem is that people who can't view flash files end up seeing that blue lego icon instead.
I want to have a jpeg display if the user cannot view an swf. I heard that an swfobject might be the solution. Does anyone know the code to make this work? Thanks so much. Similar TutorialsHello! I have used SWFobject to validate my flash object in my website http://nikolay100.comuv.com/. When I test my site on my computer everything looks great, but when I upload my site to the server, my flash object disappears. Please tell me where is my mistake. Thank you in advance! I'm having an issue with the size of my main.swf. When I use the swfobject.embedSWF code, leaving it as 100% 100% covers the entire browser window obscuring my background image. In order to view the image I have entered '1000' and '725' which are the dimensions of my main.swf. However, this left aligns the swf and the height appears to not work, I am left with a black box that extends from the bottom of my main.swf to the bottom of the browser window. What do I need to adjust in order to keep my main.swf top aligned, centered horizontally and my background image visible. Also, if anyone happens to know how I could have the background image scale to fit horizontally/vertically without repeating, that would be great. Thanks. HTML Code: <!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>Website Title</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript" src="swfobject/swfobject.js"></script> <script type="text/javascript" src="swfaddress/swfaddress.js"></script> <script type="text/javascript"> swfobject.embedSWF('main.swf', 'website', '1000', '100%', '9.0.45', 'swfobject/expressinstall.swf', {}, {bgcolor: '#CCCCCC', menu: 'false'}, {id: 'website'}); </script> <style type="text/css"> /* hide from ie on mac \*/ html, body, #website { height: 100%; overflow: hidden; } /* end hide */ body { background-image: url(images/background.png); background-repeat: no-repeat; background-position: 50% 0%; margin: 0; padding: 0; font: 86% Arial, sans-serif; } </style> </head> <body> <div id="website"> <p>In order to view this page you need Flash Player 9+ support!</p> <p> <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> </p> </div> </body> </html> Hi, I'm using swfobject.js to rope in a piece of flash onto the top of my page. I'm then using a fixed width div (below the div with the contained swf) with a background image. I'm trying to get the swf and background image to merge seamlessly, but so far no cigar. Take a look: http://www.drayfuss.co.uk/diss/site/siteDraft.html I've tried all sorts of border/margin/padding css techniques but nothing seems to be bridging that gap between the swf and the following div. Am I being dim? Cheers, drayfuss Hi, Im trying to switch over to using swfobject 2 to display my flash. I seem to have everything in place apart from having my site centered. I only want it horizontally centered. Here's my current code. Any help is very much apreciated. <!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>FlashVideoTutorials Flash Video Tutorials, XML Templates And Web Design</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"> swfobject.embedSWF("index.swf", "myContent", "800", "600", "8.0.0", "expressInstall.swf"); </script> <script language="JavaScript"> function openNewWindow(URLtoOpen, windowName, windowFeatures) { newWindow=window.open(URLtoOpen, windowName, windowFeatures); } </script> <style type="text/css"> <!-- .style1 {color: #FFFFFF} --> </style> </head> <body bgcolor="#000000"> <div align="center" id="myContent"> <h1 class="style1">Alternative content</h1> <p><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></p> </div> </body> </html> Thanks Alan |