I was wondering if there was a way to embed a .swf file using java instead of html. I remeber ready somewhere that you could, but I can't find it and I want to find out.
Yes, there is a way. This is the way I have embedded flash on my website's intro: <script type="text/javascript" language="javascript"><!-- var flashwidth = "800" var flashheight = "400" var color = "0000FF" document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="'+flashwidth+'" HEIGHT="'+flashheight+'" id="YOUR_MOVIE">'); document.write('<PARAM NAME="movie" VALUE="YOUR_MOVIE.swf">'); document.write('<PARAM NAME="quality" VALUE="high">'); document.write('<PARAM NAME="wmode" VALUE="transparent">'); document.write('<PARAM NAME="bgcolor" VALUE="#'+color+'">'); document.write('<EMBED src="YOUR_MOVIE.swf" quality="high" wmode="transparent" bgcolor="#'+color+'" WIDTH="'+flashwidth+'" HEIGHT="'+flashheight+'" NAME="YOUR_MOVIE" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">'); document.write('</EMBED>'); document.write('</OBJECT><br>'); //--> Code (markup): change YOUR_MOVIE for your own file name and ID.
May i know what is the rational behind this? Why can't just use the plain and simple html? And advantage of this?