HTML - Swfobject.embedswf Parameters
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> Similar TutorialsFor 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. Hello! 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! 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 I have been working on this thing forever!! I am in desperate need of help!! I currently am running an HTA file called h1.hta and I want to be able to open another HTA called h2.hta that will take in parameters and close the current HTA. I am using this snippet of code to open the new h2.hta(parameters) within my current h1.hta : nextpage = h2.hta?trial=2&condition=1 //vbscript set WshShell = CreateObject("WScript.Shell") WshShell.Run(nextpage) When I run this, I get a "File not Found" error. I believe it's because the file in the system is entitled h2.hta and when i send it with the parameters, it does not recognize. My question is how do I go to another hta file with parameters??? I made a preliminary layout for a website: index4-table-bad.html The problem is that it only works as intended in Opera browser. In IE and in FireFox a problem occurs: the <td id="td-menu2"> expands and shows the red background (I gave the red background intentionally to better see the problem). The "Article", "Menu1", and "News" will be dynamically generated (in php) and can have different heights. There is no option to predict which one will be the tallest. Please tell how should I correct the page so that: - <td id="td-menu"> should not expand and stay 35px heigh and the article should go just below it with 5px spacing (as it now works only in Opera) - as it is now, all areas should end at the bottom at the same level (I mean: "MENU1", "ARTICLE", "NEWS" should end at the same level/line at bottom). What would be the best way to improve this layout to correct abovementioned bug? I haven't been coding html for over 10 years so I am not sure how I should approach to this bug nowadays. Is it better to add Javascript or trasform this layout into divs instead of the table. But even with divs it will perhaps need Javascript to keep areas ends at bottom at same level. Or is there any better way than Javascript? I am working with current browser versions: Opera 9.64, IE 8, FireFox 3.0.10. Regards, Mark Hi! I was wondering whether someone could enlighten me (or do it for me), as to how I use URL Parameters. I don't understand javascript, or much html for that matter. I have a page, 'http://goldenlightsoft.org'. I want to set it up so if someone types in 'http://goldenlightsoft.org/index.htm?page=downloads.htm', they would see the normal page, except that the iFrame in the middle ('I1'), would be pointing to downloads.htm of the site, not the normal home.html. I would prefer this system to work without compatibility issues with other browsers, and also I am not sure of the hosts capabilities. I know html and javascript work fine. Can someone help me with this? Thanks, dawmail333 I am writing an "external link exit page" where anytime a user clicks on an external link in my site, it navigates to a page exit.html that says something to the effect of: "Please note that you are leaving our website, and therefore we are not responsible for the content of the website you are about to visit." I was thinking of making the destination URL be a parameter, so for example a section of links on my website might look something like this: <h3>Other Sites You Might Find Useful</h3> <a href="exit.html?url=http://www.google.com">Google</a><br /> <a href="exit.html?url=http://www.yahoo.com">Yahoo!</a><br /> <a href="exit.html?url=http://www.weather.com">weather.com</a><br /> So in exit.html I have a parameter called url that needs to be decoded and placed in my HTML source. After I display the warning message I want to give the user the option to either go back or continue to the externall url. <h3>You are now leaving our website. Please be advised that we are not responsible for the content of the website you are about to visit. </h3> <h4>Are you sure you want to continue?</h4> <a href="[URL parameter]">Yes! Continue to [URL parameter]</a><br /> <a href="javascript:history.go(-1)">No! Cancel and go back</a><br /> How do I do this? Hi, How can I explicitly add parameters to a form, besides the input that the user has inserted ? I have tried something as: action="www.nnn123.com?myPrameter=1" but it doesn't work... thanks I'm working on a site with an image gallery which directly links to images. I'd like to modify this so that, when those images are small, they are no longer displayed off-center and on a white background. At some point in the past I think I remember seeing a site that somehow passed display parameters to the browser along with the image link. Is this possible, or am I imagining things? Thanks for any info. (If this turns out to be impossible, I'll be rebuilding the gallery a bit, and any hints on an easy way to do this would also be apreciated.) Guys, I have the following code which was generated by a Firefox add-on: Code: <SearchForm>http://legendas.tv/index.php?opcao=buscarlegenda</SearchForm> <os:Url type="text/html" method="POST" template="http://legendas.tv/index.php?opcao=buscarlegenda"> <os:Param name="txtLegenda" value="{searchTerms}"/> <os:Param name="selTipo" value="1"/> <os:Param name="int_idioma" value="99"/> </os:Url> Is it possible to get all these parameters together in a single URL line? Something like: Code: http://legendas.tv/index.php?opcao=buscarlegenda&txtLegenda={searchTerms}&selTipo=1&int_idioma=99 I don't know. This was just a banal example to picture my intention. So, is it possible? If so, please, what would that URL look like? Thanks a lot, guys. brunces Is it possible (&if so how) to pass a search parameter when linking through an iframe. Page A always wants to load a suppliers catalogue in an iframe with the search field filled - same fill every time (so if it is possible there are no complications). Unfilled the address is suppliersite.com/search.asp The form on the suppliersite search page search page only has one field & search button Thanks sub |