Solved

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

Posted on 2007-12-06
4
134 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
Comment Utility
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
Comment Utility
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
Comment Utility
>> 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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Uploading files to the web server has become common part of almost any kind of web application. People use different technologies to solve this, but regardless of the technology used, it is always useful to have some kind of progress indicator shown…
Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

772 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now