HTML - Embed Or Object Tags For Java Applets
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 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 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> Hi, I have trouble to pass arguments to the main class in applets. There are three different class within the Main class in the applets, Easy.class, Intermediate.class and Expert.class. In HTML, how can I pass arguments to applets so that they can interact with each other by calling the three classes from the main class? The codes a HTML Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Jigsphere Main</title> <link href="../../../Users/User/Documents/JigSphere.com/MainPage.css" rel="stylesheet" type="text/css" /> <!--[if IE]> <style type="text/css"> /* place css fixes for all versions of IE in this conditional comment */ .twoColElsLtHdr #sidebar1 { padding-top: 30px; } .twoColElsLtHdr #mainContent { zoom: 1; padding-top: 15px; } /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */ </style> <![endif]--> <style type="text/css"> <!-- .style1 { font-family: Geneva, Arial, Helvetica, sans-serif; color: #000000; background-color: #3366FF; } body { background-color: #00CCFF; } --> </style> <script src="../../../Users/User/Documents/JigSphere.com/Scripts/AC_RunActiveContent.js" type="text/javascript"></script> </head> <body class="twoColElsLtHdr"> <div id="container"> <div id="header"> <h1 align="center" class="style1"><img src="Logo.gif" alt="logo" width="354" height="84" /><!-- end #header --> </h1> </div> <div id="sidebar1"> <h3> <script type="text/javascript"> AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','306','height','309','title','Logo','src','../../../Users/User/Documents/JigSphere.com/bluesphere','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','../../../Users/User/Documents/JigSphere.com/bluesphere' ); //end AC code </script> <noscript> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="306" height="309" title="Logo"> <param name="movie" value="../../../Users/User/Documents/JigSphere.com/bluesphere.swf" /> <param name="quality" value="high" /> <embed src="../../../Users/User/Documents/JigSphere.com/bluesphere.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="306" height="309"></embed> </object> </noscript> </h3> <!-- end #sidebar1 --></div> <div align="center"> <p><img src="Easy button.png" alt="easy" width="264" height="64" /></p> <p> <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats --> <img src="Intermediate button.png" alt="intermediate" width="264" height="64" /></p> <p><img src="Expert button.png" alt="expert" width="264" height="64" /></p> <p><img src="High Scores button.png" alt="high scores" width="264" height="64" /></p> <p align="center"><img src="Quit.png" alt="quit" width="113" height="65" /><br class="clearfloat" /> </p> </div> <div id="footer"> <p align="center">JigSphere™</p> <!-- end #footer --></div> <!-- end #container --></div> </body> </html> I want to embed the codes in the image button.png, once user click any of the button, the requested class will be passed by applets to HTML and displaying the page in HTML. This is what I got.. HTML Code: <HTML> <HEAD> <TITLE> JigSphere Main Page </TITLE> </HEAD> <BODY> <APPLET CODE = "TheMain.class" WIDTH = "1250" HEIGHT = "650"> <PARAM NAME="easy" value ="JigSphereEasy.class"> <PARAM NAME="intermediate" value ="JigSphereInt.class"> <PARAM NAME="expert" value ="JigSphereEx.class"> </applet> Is it correct? what should I put then in the param name? and the value? i'm looking for a cheap way out of making collapse/expand code. i've learned a lot of 'ghetto' techniques n thought mayb i can use something similar to the html tricks i've learned in the past. the theory i have is.. i use the title of the collapse/expand text as a link to the text below it to open and close by using the navigating tags: Code: <a name="content">opening/closing text here</a> and the title above the content: Code: <a href="#content">Title</a> to open the area of text. now my idea of a shortcut around the whole css/html/javacript combo is to make the text below it use a Code: <font size=0>content</font> at default and have the href title link change the font size to the default 9pt but I don't know if that's even possible. Is it possible with the Code: <div> tags? and if so, using that, would i still b able to make a link like that? How to create explorer like menu in Html or java script? eg + Game(inside this Cricket and Football) when click on + sign it become like-- - Game -Cricket -Football Can anybody suggest me, by which command I can do it? Commercial Removals || Removals and Storage||Specialist Removals Is it possible to trigger the action of a form with a submit button that's outside the form tags? If so, how should this example be rescripted to make the input tag work outside the form tags? [/code] <html> <body> <form name="input" action="html_form_action.asp" method="get"> First name: <input type="text" name="FirstName" value="Mickey" /><br /> Last name: <input type="text" name="LastName" value="Mouse" /><br /> <input type="submit" value="Submit" /> </form> </body> </html> [/code] 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 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 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> 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> 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! Hi folks, I have a simple question using the <embed> tag. My code is as follows: <embed width='100%' height='100%' src='../media/movies/intro.wmv' autostart=true> The movie plays just fine but when the browser loads it seems to load the first frame of the video and superimposes the actual video over that. However, if I go to another tab or minimize the browser then return to the screen the movie looks fine. I'm still learning about this stuff so I'm not sure if there is a buffer/cache issue or not. Can someone please give me some idea on how to solve this problem? Thanks in advance My html file has 7 embed tag lines at the top so that I can play wav files when a mouseover is done. That works. The problem is that there seems to be no way to hide some tiny little dots on the screen where the embed files live. When I tried hidden="true" on the embed tag, the sounds will not play. So then I moved the embed lines at the bottom of the html file after my iframe line but before the close body tag, and the sounds stopped playing. My goal is to have the little dots appear at the bottom of the screen where they are not so obvious, or, even better, not appear at all. Does anyone have any ideas, please? Hi, I am currently having trouble embedding my flash file into html. No matter what I try it will not work. I don't have much experience in html so could really use some help please. This is the code that I am using... <object classid="clsid: D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6" width="814" height="344"><param name="movie" value="http://megaswf.com/serve/79631/" /><param name="quality" value="high" /><param name="menu" value="false" /><param name="scale" value="exactfit" /><embed src="http://megaswf.com/serve/79631/" width="814" height="344" menu="false" scale="exactfit" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object> Thanks, Adam 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. Is there a way of putting a font into a website viewers temp file so it can be used on the website. As I would like to make my own font to go on my website but if that viewer didn't have it, then it wouldn't show. I don't really like the idea of having somebody download the font and then have to put it into their font file so if that could be avoided. Thanks. Hello there, Heres a question, I started a document and inserted flash using dreamweaver. Dreamweaver made an <object> tag and its <param> tags, Also it put an <embed> tag inside that whole deal. using HTML 4.0 Strict DTD, when i validated the document, the was an error that said: Code: The tag name: "embed" Not found in currently active versions.[HTML 4.0] I know that this little trick was used to make sure the flash would play in IE and FF and all browsers for that manner because of the different tag support. So with that said, how do we ensure today that the flash will play in all browsers if we cant use <embed> anymore with current active versions? Thanks in advance |