Solved

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

Posted on 2007-12-06
4
138 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Read about why website design really matters in today's demanding market.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
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…

867 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