?
Solved

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

Posted on 2007-12-06
4
Medium Priority
?
172 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 2000 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
The viewer will learn how to count occurrences of each item in an array.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses
Course of the Month13 days, 22 hours left to enroll

809 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