Solved

More help with code that bypasses double-clicking to activate Flash content

Posted on 2007-12-06
4
141 Views
Last Modified: 2010-05-18
I've asked this question before, but I have trouble time each time i try to incorporate this feature into my existing HTML code. I have the "swfobject.js" in all my folders.
Could you please rewrite the attached source code to fix the flash content problem?

Thanks,
John
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>JC Portfolio</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<style type="text/css">
<!--
body {
	background-color: #000000;
	background-repeat: repeat-x;
}
.style6 {
	color: #FFFFFF;
	font-family: Bobcat;
	font-size: 36px;
}
-->
</style>
</head>
 
<div align="center">
  <p>&nbsp;</p>
  <p>
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="720" height="540">
      <param name="movie" value="../Brick%20Wall.swf">
      <param name=quality value=high>
      <embed src="../Brick%20Wall.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="720" height="540"></embed>
    </object>
  </p>
</div>
</body>
</html>

Open in new window

0
Comment
Question by:gabrielPennyback
  • 2
  • 2
4 Comments
 
LVL 25

Expert Comment

by:Rouchie
ID: 20427102
You could try this wizard to help you:
http://www.kirupa.com/developer/flash8/flash_fix.htm

One thing that will cause problems is the space character in the file name.  "Brick Wall.swf" should be renamed to "brickwall.swf"
0
 
LVL 1

Author Comment

by:gabrielPennyback
ID: 20435138
Thanks, rouchie. I went to that link, which generated this code for me:

<script type="text/javascript" src="flashobject.js"></script>
<div id="flashcontent" style="width: 720px; height: 540px"></div>
<script type="text/javascript">
var fo = new FlashObject("../BrickWall.swf", "animationName", "720", "540", "8", "#FFFFFF");
fo.addParam("allowScriptAccess", "sameDomain");
fo.addParam("quality", "high");
fo.addParam("scale", "noscale");
fo.addParam("loop", "false");
fo.write("flashcontent");
</script>

I tried it and all I got was a webpage with the code on it in text.

I'm afraid I am so dense that I need you to place this script in my code above excatly where it should go.

Thanks,
John
0
 
LVL 25

Accepted Solution

by:
Rouchie earned 500 total points
ID: 20440328
>> I tried it and all I got was a webpage with the code on it in text.

That's because there is an error in your code - you have no <body> tag, so the browser doesn't know when to start rendering.

Here's is the correct code, place in the appropriate place:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>JC Portfolio</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<style type="text/css">
<!--
body {
        background-color: #000000;
        background-repeat: repeat-x;
}
.style6 {
        color: #FFFFFF;
        font-family: Bobcat;
        font-size: 36px;
}
-->
</style>
</head>
<body>
<div align="center">
  <p>&nbsp;</p>
  <p>
<script type="text/javascript" src="flashobject.js"></script>
<div id="flashcontent" style="width: 720px; height: 540px"></div>
<script type="text/javascript">
var fo = new FlashObject("../BrickWall.swf", "animationName", "720", "540", "8", "#FFFFFF");
fo.addParam("allowScriptAccess", "sameDomain");
fo.addParam("quality", "high");
fo.addParam("scale", "noscale");
fo.addParam("loop", "false");
fo.write("flashcontent");
</script>
  </p>
</div>
</body>
</html>

Open in new window

0
 
LVL 1

Author Comment

by:gabrielPennyback
ID: 20473424
It still doesn't work, so here is the link to a folder with the html and swf  and the script files, so that you can download them and emulate exactly what I'm doing: http://67.19.27.66/~john/PortfolioTest/

I tried to copy the code from another webpage of mine where I was able to get it to work with 2 swf files, and here's a link to those files:  http://67.19.27.66/~john//DreamusTest/

Hopefully this will do the trick!

Thanks,
Johh

0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question