HTML - Proper Method To Embed A Swf Object
I am unsure which of the below methods of embedding a flash object into a web page is correct - and which is a deprecated method. Any help would be very much appreciated!
Method one: <object width="800" height="480"> <param name="movie" value="Gallery.swf"> <embed src="Gallery.swf" width="800" height="480"> </embed> </object> -- Method two: <script type="text/javascript"> var flashvars = {XMLFile: "gallery.xml"}; var params = {bgcolor: "#000000"}; swfobject.embedSWF("Gallery.swf", "myAlternativeContent","800", "480", "9.0.0",false, flashvars, params); </script> <div id="myAlternativeContent"> <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> Similar TutorialsDoes somebody know what is the current stay of the play with <EMBED> and <OBJECT> tags? I can not find a clear information if I need to use both tags, or just one to embed objects into HTML. I want a descriptive test to appear to do this with <img I use 'alt' or with <a I use 'title' How can I get the same effect with an SWF? I use the following code - but I cannot find a place where 'alt' or 'title' works reliably in IE,Opera and FF and others - help appreciated Code: <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="120" height="60" id="a120_60_us" align="middle" > <param name="allowScriptAccess" value="always" > <param name="allowFullScreen" value="false" > <param name="movie" value="http://www.easyfundraising.org.uk/images/user-banners/ef-flash/120_60_us.swf?target=_blank=try&clickThrough=http%3A%2F%2Fwww.easyfundraising.org.uk%2Ftelfordsteamrailway%2F" > <param name="quality" value="high" > <param name="bgcolor" value="#ffffff" > <embed src="http://www.easyfundraising.org.uk/images/user-banners/ef-flash/120_60_us.swf?target=_blank&clickThrough=http%3A%2F%2Fwww.easyfundraising.org.uk%2Ftelfordsteamrailway%2F" quality="high" bgcolor="#ffffff" width="120" height="60" name="120_60_us" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" > </object> Hi, I am completely new to html. I have my own website, which I built using a content management system. Unfortunately this system doesn't allow me to have any access to the html head section, only the body. I want to create a slide show for my homepage. Does anyone know how I could do this please without reference to the head section? Currently, I have created a gif animation, which is fine but the file is way to large to leave it on there for good. I can create a flash slide show but have no idea how to embed it so that when a user goes to my home page the slide show starts to play automatically. Thanks Yug Hi, I've been trying to figure out how to use OBJECT and/or EMBED tags to embed a java applet in webpages and I can't make sense of it. I want people to be able to embed the java player in their own website or myspace page or whatever. I have found several similar examples and tutorials online, but I haven't been able to successfully adapt them for my situation. The webpage needs to open a java applet player archived in a .jar file on our website, and that player also takes a parameter for which project to play, with the projects saved elsewhere on our website. I can get the player to load, but I think there is a problem with taking the parameter to specify what file to open within the player. I have completely working code using an APPLET tag but since APPLET is deprecated I want to accomplish the same thing using OBJECT for IE and OBJECT or EMBED for Mozilla. I assume I will have to use some sort of browser detection and conditional statements to accomodate both browsers, but right now I can't even get something working for just one or the other. I have a couple of test pages, including the working versions with the applet tag, he http://web.mit.edu/jhansel/Public/HTML%20testing/. If anyone knows how to do this, or has any ideas what I might be doing wrong, it would be extremely helpful. Thanks so much. Jon Hello, I'm currently hosting my website through another domain but am using a .com which forwards you to my site. Example; go to www.example.com and it takes you to www.bluered.com/example/main.html . The problem is that when searching through Google, it is not recognizing my .com name, only the hosting url. I attempted a Java 301 redirect which I applied to the body section of my HTML but I am not sure if it worked. This is the code I entered: <% response.setStatus(301); response.setHeader( "Location", "http://www.new-url.com/" ); response.setHeader( "Connection", "close" ); %> I replaced the "http://www.new-url.com/" with my .com name and placed this code in the code on my landing page. Can anyone give me some suggestions, tips? It would be greatly appreciated. Thank you I am having HTML page which also includes css. It works properly in firefox, but in IE the whole document is not get well aligned What changes should i have to make to view it in any browser. Thanks Hello, I am wondering if something is possible.. and if it is, how I would go about accomplishing the desired result.. This is a sample page to illustrate the problem http://comp.uark.edu/~bcagnin/test/index.html Is there a way to resize the object from a link that is within the website being displayed in that very same object?? Also, I am willing to use iframe if there is a solution that can be found with that... Thanks!! Tyrick I am still unsure of the proper time to use <td>s <table>s etc. I have been getting into the habit of always useing CSS to format my pages. Will using <table>s make it any easier to make my web pages? Second, I was wondering if there are any good websites providing free help with Fireworks 8. I am not very good with it and want to learn more to make my sites more appealing. Thank-you. Nathan Currently my website uses frames and no css. I need to update it, but I'm in a huge time crunch!!! (And don't know css and only know very very basic HTML) I need my website to be functional (not in limbo) by next weekend, so it either has to stay how it is now (frames & older HTML) or be totally done by then. Is there anywhere that I can get help to do this automatically instead of waiting until later when I have way more time to learn it myself (that changes your code easily/automatically), or super awesome people who love HTML and will do it for me? It's a pretty simple/basic website and I would be SO so SO appreciative. Hello, I just recently started "cutting up" a website layout in Photoshop and coding it in Dreamweaver. Though I am aware that CSS would be best for doing this, I am still choosing to use a table for the layout. My question is, what is the proper way of hand coding a table? Mind you, this is a fairly complex table with many rows and columns and cells of all kinds of sizes. I used Photoshop to export the code and then went in and changed what I needed to. Photoshop uses spacer gif's in their table code. I'd like to try hand coding the table so that I don't have to use spacer gif's and then I'll be able to edit the table later on, more easily (to change the bottom layout, but keep top navigation on all pages.) Right now, with the spacer gif's I can't add any cells without the whole layout falling apart. I'm just looking for good code for building complex tables (coding by hand). Thanks! Here's a link to the site I'm working on: http://www.matthewpavkov.com/dtim/index.html Hello- A quick question for those in the know: Is it considered "proper" to put multiple between words to space them out, or is another method preferred as the "correct" way to do it? I've used tables and transparent 1x1 .gifs for spacing as well depending on the page, but there are a number of times where it's just easier to lay about ten or fifteen nbsps in there till the text is nudged over where you need it and be done with it. Makes for an ugly source, but seems to work fine. It seems to render properly doing it this way, at least in IE and Firefox, but is it still kosher to do so? Or is everything "proper" supposed to be done with style sheets now? Thanks, Hi, I'm writing a terms and conditions page in plain XHTML where we have lots of text along the lines of this: 1 Lorem ipsum intro to 1 1.1 More blurb goes in here 1.2 and a whole bunch of other stuff you can't do 2 La-di-dah here's section two 2.1 this that and the other I'd like to use nested ordered lists (OL tags), but we are quite rigid about the numbering in that the sub-sections must be x.x. This is so we can refer to them without any ambiguity. Getting the layout and positioning is no problem, but I don't see how to write this with OL tags. I tried using VALUE="2.1" in the LIs but this doesn't work. I'm assuming a list is the proper thing to use in this case, but I'm open to other ideas (DL maybe???). Hello, I'm writing .html text usully like: Code: <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Language" content="en-us" /> <meta http-equiv="image" content="no" /> </head> But all website's syntax a Code: <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Language" content="en-us" /> <meta http-equiv="image" content="no" /> </head> Is there any software to make that ? Or i have type by hand everythink ? Hi, my name is Josh, and I'm fairly new to website design, so therefore, also a little new to HTML. I apologize in advance for the length of my post, but I feel I really need to be specific as much as possible. Let me be honest with you. I have very limited knowledge on the subject, but I am a quick learner. Anyway, I'm creating a directory on my website where the visitor would be able to clink on one of 51 links, aligned in 3 columns, to take them to a page listing businesses within one of the 50 states. The 51st link, of course, would be directing visitors to an international listing page. Then below the links for the different states, there is supposed to be 26 links, one for each letter of the alphabet, so the visitor can find a business by name. Following that, of course, would begin the listing of the businesses. Basically, I've been teaching myself HTML so far by viewing the source code of pages I visit, and I discover a basic idea of how to do different things with web design. Let me show you the format I've been trying to grasp with this project by giving you an example code. The following code places the links for the states all at the bottom, and also they are not aligned properly, as the first column appears higher than the second which is also higher than the third. I'm not sure I quite understand the way this code works, or what mistake I'm making with it. What I would actually rather do is have a code creating a drop-down box which the visitor would just select their option, and be directed to the requested page immediately, but I don't know how to do that either. At any rate, I do also need to figure out how to get those state-by-state links to appear at the top of the business listings instead of at the very bottom of the page the way it is appearing now with this code. If anybody could help me figure out what the heck I'm doing, I would really appreciate it. HTML Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- saved from url=(0063)[url]http://www.geocities.com/josh**************/connections.html[/url] --> <HTML> <HEAD> <TITLE>Connections</TITLE> <body background="http://www.geocities.com/clipart/pbi/backgrounds/Template_Pages/aboutme_techie_bg2.gif" bgcolor="#000000" link="#ff0000" vlink="#ff00ff" text="#00ff00" > <table border=0 cellspacing=0 cellpadding=0 width=650> <tr valign="top" align="left"> <H1><A name=top>Connections</H1></FONT></A> <P><IMG height=4 src="" width=500></P><FONT color=#0000ff> <H2>Welcome to...</H2></FONT> <tr valign="top" align="left"> <td colspan=1 height=750></td> <td align="left" colspan=3 rowspan=1 width=639><p><b><i><u><font color="#7F7F7F" face="Arial Black" size="+1"><A href="http://www.geocities.com/josh**************/alabama.html">Alabama</A><br><A href="http://www.geocities.com/josh**************/arizona.html">Arizona</A><br>...</font></b></i></u></td> <td colspan=2 height=750></td> </tr> <tr valign="top" align="left"> <td colspan=1 height=750></td> <td align="center" colspan=3 rowspan=1 width=639><p><b><i><u><font color="#7F7F7F" face="Arial Black" size="+1"><A href="http://www.geocities.com/josh**************/kentucky.html">Kentucky</A><br><A href="http://www.geocities.com/josh**************/louisiana.html">Louisiana</A><br>...</font></b></i></u></td> <td colspan=2 height=750></td> </tr> <tr valign="top" align="left"> <td colspan=1 height=750></td> <td align="right" colspan=3 rowspan=1 width=639><p><b><i><u><font color="#7F7F7F" face="Arial Black" size="+1"><A href="http://www.geocities.com/josh**************/northcarolina.html">North Carolina</A><br><A href="http://www.geocities.com/josh**************/ohio.html">Ohio</A>...</font></b></i></u></td> <td colspan=2 height=750></td> </tr> <P><A href="http://www.geocities.com/josh**************/connections.html#A">A</A> <A href="http://www.geocities.com/josh**************/connections.html#B">B</A>...</P> <P><A href="http://www.geocities.com/josh**************/connections.html#N">N</A> <A href="http://www.geocities.com/josh**************/connections.html#O">O</A>...</P> <P><A href="http://www.geocities.com/josh**************/home.html">Return To Home Page</A></P> <FONT color=#00ff00> <H3>13AD LUC ENT</H3> <ADDRESS>12341 Nellis Street, Springfield Gardens, NY 11413-1440</ADDRESS> <ADDRESS>718.807.8811</ADDRESS>... <H3>Zoom Records</H3> <ADDRESS>19 Embarcadero Cove, Oakland, CA 94606</ADDRESS> <ADDRESS>510.535.9666</ADDRESS> <P><A href="http://www.geocities.com/josh**************/connections.html#top">Return to Top</A></P> <P><A href="http://www.geocities.com/josh**************/home.html">Return to Home Page</A></P> </BODY></HTML> As you can see, my knowledge of HTML is pretty basic, and I'm sure you can tell that I tried to abbreviate this excerpt code as much as possible to conserve space on this post. I placed three dots "..." in many places to signify where large irrelevant portions of the page have been omitted, especially where I eliminated the thousands of business listing codes...lol. It may also have not been necessary to provide as much of the code as I did, but I just wanted to make sure that what I need is understood so perhaps I can get some help. Thank you everyone in advance for your assistance... For some reason this code won't work. The black window shows up with controls but the video doesn't play. The filename and directory are correct. <object id="MediaPlayer" width="200" height="200" classid="22D6F312-B0F6-11D0-94AB-0080C74C7E95"> <param name="FileName" value="gts1.wmv"> <param name="AutoStart" value="True"> <param name="ShowControls" value="True"> <param name="ShowStatusBar" value="True"> <param name="ShowDisplay" value="True"> <param name="AutoRewind" value="True"> <embed type="application/x-mplayer2"pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/" width="200" height="200" src="gts1.wmv" filename="gts1.wmv" autostart="True" showcontrols="True" showstatusbar="True" showdisplay="True" autorewind="Flase"> </embed> Why won't it work: HTML Code: <object width="300" height="42"> <param name="src" value="http://platnium.fileave.com/No_More_Memory.mp3"> <param name="autoplay" value="true"> <param name="controller" value="true"> <param name="bgcolor" value="#ffffff"> <embed src="http://platnium.fileave.com/No_More_Memory.mp3" autostart="true" loop="true" width="300" height="42" controller="true" ></embed> </object> Hi, i know that iframe isnt xhtml compatible, what do i use instead? is it the embed tags? If so, how do i use them? i take it i dont just replace the word iframe with embed? Thanks! Hi, Is it possible to embed a quicktime .mov file and not allow the user to download the video? Thanks for the help, B I hope this is the correct forum. I have a large swf file that until some of this loads all the user sees is a blank box on the page. What I would like to do is show a gif or jpg there that is small enough to show the control bars of the swf file so the user can see something is going on and then when enough loads they can push play and see the video not the gif. I wanted to use preloaders but my client says no they want a static gif above the player controls. I have seen this done on other sites but I cannot figure this out. I code in the image with a div tag above the swf embed code using transparent in the embed code and all I see is a blank screen until the movie has downloaded and my controls are gone when it loads. So I am wondering do I need a transparent title page in the swf so it will show the image or what? Code where image will go: (<div id="flashcontent"> This text is replaced by the Flash movie. </div> ) Here is my embed code: (<script type="text/javascript"> var so = new SWFObject("capture3.swf", "mymovie", "640", "480", "8", "#336699"); so.addParam("quality", "low"); so.addParam("wmode", "transparent"); so.addParam("salign", "t"); so.write("flashcontent"); </script>) Thanks! I can't get one of my pages to validate in xhtml, it seems to be the <embed> part which is causing the problems. Here is a link to the page: http://www.a104mc.connwarwicker.co.uk/music.html And here is the section which is causing most of the errors: HTML Code: function playSound(s){ var f = playList[s]; var t = songNames[s]; $('connsplayground').innerHTML = ""; $('connsplayground').innerHTML = "<embed src='http://www.a104mc.connwarwicker.co.uk/sounds/"+f+"' hidden='true' style='width:0px;height:0px;' autostart='true' loop='true' />"; $('songtitle').innerHTML = t; currentSong = s; alterText(); } With such errors as: there is no attribute "src". there is no attribute "hidden" there is no attribute "style" there is no attribute "autostart". etc... I'm using this doc type: HTML Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Any idea as to how i can fix these errors? I've tried using an <object> instead, but that didn't seem to work very well at all. |