Flash doesn't show up in html file on the web

blank white place. using Dreamweaver CS3.

Page 1 of 1

7 Replies - 4367 Views - Last Post: 16 February 2008 - 12:41 PM

#1 l29go  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 04-February 08

Flash doesn't show up in html file on the web

Post icon  Posted 04 February 2008 - 11:12 PM

Sorry,

I am a beginner web designer, but I have search for this answer for DAYS now! I have placed flash in a html file in Dreamweaver CS3. I have tried to get it to show up on the web to no avail. It plays fine in Dreamweaver, but doesn't show up in the preview (not even the dreaded white box). The white box shows up when I try to view the site online. I know the html file is there because the html graphics show up, but the flash media doesn't. I have double checked that both local and ftp directories match. I have uploaded the script file and the AC_RunActiveContent file to the server in the same directory as the local. I have tried uploading just the Scripts file, just the AC_RunActiveContent file, and both - to see whatever works! In my anguish I have also double checked my flash publish settings (played with them to see if that helped, and then reversed them back to step 1), made sure my images (flash and html) were there, and gone in and double checked the script source code in the html file to make sure it embeds the source, absolute. I am ready to pull my hair out or declare another occupation! Is this just CS3 craziness, or will the answer be revealed to me in a dream!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>vueLive: Broadcast Now!</title>
<style type="text/css">

body {
	font: 100% Verdana, Arial, Helvetica, sans-serif;
	background: #003300;
	margin: 0; 
	padding: 0;
	text-align: center; 
	color: #000000;
}
.oneColFixCtr #container {
	width: 950px;  
	background: #003300;
	margin: 0 auto; 
	text-align: left; 
}
.oneColFixCtr #mainContent {
	padding: 0; 
}

</style>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>

<body class="oneColFixCtr">

<div id="container">
  <div id="mainContent">
  <script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','950','height','700','title','vuelive','src','/web/home','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','/web/home' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="950" height="700" title="vuelive">
	<param name="movie" value="/web/home.swf" />
	<param name="quality" value="high" />
	<embed src="/web/home.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="950" height="700"></embed>
  </object></noscript>
		
  </noscript></div>
</div>
</body>
</html>



P.S. I have also tried to delete the </noscript> and script tags to disastrous results.

thanks.

Is This A Good Question/Topic? 0
  • +

Replies To: Flash doesn't show up in html file on the web

#2 Arbitrator  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 51
  • View blog
  • Posts: 530
  • Joined: 26-January 05

Re: Flash doesn't show up in html file on the web

Posted 05 February 2008 - 06:34 AM

You didnít provide the Javascript or Flash files nor did you mention the browser(s) in which the issue is occurring, so itís difficult to help you.

I can tell you that your code contains a well‐formedness error in the form of an extra noscript element end tag. It also has an XHTML 1.0 Transitional validity error and HTML/XHTML and MIME/media type conformance issues, but I wonít bother you with those.

My guess would be that you didnít include the file extension ď.swfĒ in two of your parameters (or would the term be ďargumentsĒ?) to the AC_FL_RunContent function. Of course, without seeing the script, I have no way to know if the file extension is generated automatically or not.
Was This Post Helpful? 0
  • +
  • -

#3 l29go  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 04-February 08

Re: Flash doesn't show up in html file on the web

Posted 05 February 2008 - 08:32 PM

This happens on both FireFox and Internet Explorer 7. I don't think its a browser issue, but I am a novice and could be wrong.

Is this the code you are looking for for home.swf:
<!-- saved from url=(0013)about:internet -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>home</title>
<script language="javascript"> AC_FL_RunContent = 0; </script>
<script language="javascript"> DetectFlashVer = 0; </script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
<script language="Javascript" type="text/javascript">
<!--
// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = 9;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Revision of Flash required
var requiredRevision = 115;
// -----------------------------------------------------------------------------
// -->
</script>
</head>
<body bgcolor="#ffffff">
<!--url's used in the movie-->

<!--text used in the movie-->
<script language="Javascript" type="text/javascript">
<!--
if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {
	alert("This page requires AC_RunActiveContent.js.");
} else {
	var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
	if(hasRightVersion) {  // if we've detected an acceptable version
		// embed the flash movie
		AC_FL_RunContent(
			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0',
			'width', '950',
			'height', '700',
			'src', 'home',
			'quality', 'high',
			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			'align', 'middle',
			'play', 'true',
			'loop', 'true',
			'scale', 'showall',
			'wmode', 'window',
			'devicefont', 'false',
			'id', 'home',
			'bgcolor', '#ffffff',
			'name', 'home',
			'menu', 'true',
			'allowScriptAccess','sameDomain',
			'allowFullScreen','false',
			'movie', 'home',
			'salign', ''
			); //end AC code
	} else {  // flash is too old or we can't detect the plugin
		var alternateContent = 'Alternate HTML content should be placed here.'
			+ 'This content requires the Adobe Flash Player.'
			+ '<a href=http://www.macromedia.com/go/getflash/>Get Flash</a>';
		document.write(alternateContent);  // insert non-flash content
	}
}
// -->
</script>
<noscript>
	// Provide alternate content for browsers that do not support scripting
	// or for those that have scripting disabled.
	  Alternate HTML content should be placed here. This content requires the Adobe Flash Player.
	  <a href="http://www.macromedia.com/go/getflash/">Get Flash</a>
</noscript>
</body>
</html>



thanks again

This post has been edited by l29go: 05 February 2008 - 09:12 PM

Was This Post Helpful? 0
  • +
  • -

#4 Arbitrator  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 51
  • View blog
  • Posts: 530
  • Joined: 26-January 05

Re: Flash doesn't show up in html file on the web

Posted 06 February 2008 - 01:27 AM

View Postl29go, on 5 Feb, 2008 - 10:32 PM, said:

Is this the code you are looking for for home.swf:
That file is an HTML/XHTML file with technical errors. Considering that the file extension in use is that for a Shockwave Flash (*.swf) file, why are you serving an HTML/XHTML file instead?

Your newly provided code still doesnít say much about your issue either. It references a file called AC_RunActiveContent.js, which you still have not provided. It also references another Flash file (via 'src', 'home', and 'movie', 'home',) that you have not provided (or so Iíve inferred). Since the name of the file is the same (i.e., home), I can only wonder if home.swf is making a circular reference to itself.

I must also ask if you verified whether or not the original solution (provided in my previous post) was tried or not and whether it worked or not since, again, the reference to the Flash (or, apparently, HTML/XHTML) file contains no file extension.
Was This Post Helpful? 0
  • +
  • -

#5 l29go  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 04-February 08

Re: Flash doesn't show up in html file on the web

Posted 06 February 2008 - 06:50 AM

Arbitrator,

I am sorry but, I am not a flash programmer. I have placed a flash file into a html file (because I wanted continuous bkgd and because I may add other div tags for other content) using the Dreamweaver CS3 WYSIWYG editor - just like you see in numerous tutorials, references, etc.

Just place cursor in div or place you want flash and go to insert>media>flash. The AC_RunActiveContent.js file is Dreamweaver generated. I didn't create it. So to reference your first reply: Do you want me to go into the original js file and make these changes or in the XHTML file. I didn't know what you were talking about.

Here's the code for that js file:
//v1.7
// Flash Player Version Detection
// Detect Client Browser type
// Copyright 2005-2007 Adobe Systems Incorporated.  All rights reserved.
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

function ControlVersion()
{
	var version;
	var axo;
	var e;

	// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry

	try {
		// version will be set for 7.X or greater players
		axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		version = axo.GetVariable("$version");
	} catch (e) {
	}

	if (!version)
	{
		try {
			// version will be set for 6.X players only
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
			
			// installed player is some revision of 6.0
			// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
			// so we have to be careful. 
			
			// default to the first public version
			version = "WIN 6,0,21,0";

			// throws if AllowScripAccess does not exist (introduced in 6.0r47)		
			axo.AllowScriptAccess = "always";

			// safe to call for 6.0r47 or greater
			version = axo.GetVariable("$version");

		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 4.X or 5.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 3.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = "WIN 3,0,18,0";
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 2.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			version = "WIN 2,0,0,11";
		} catch (e) {
			version = -1;
		}
	}
	
	return version;
}

// Javascript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	var flashVer = -1;
	
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
			var descArray = flashDescription.split(" ");
			var tempArrayMajor = descArray[2].split(".");			
			var versionMajor = tempArrayMajor[0];
			var versionMinor = tempArrayMajor[1];
			var versionRevision = descArray[3];
			if (versionRevision == "") {
				versionRevision = descArray[4];
			}
			if (versionRevision[0] == "d") {
				versionRevision = versionRevision.substring(1);
			} else if (versionRevision[0] == "r") {
				versionRevision = versionRevision.substring(1);
				if (versionRevision.indexOf("d") > 0) {
					versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
				}
			}
			var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	else if ( isIE && isWin && !isOpera ) {
		flashVer = ControlVersion();
	}	
	return flashVer;
}

// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
	versionStr = GetSwfVer();
	if (versionStr == -1 ) {
		return false;
	} else if (versionStr != 0) {
		if(isIE && isWin && !isOpera) {
			// Given "WIN 2,0,0,11"
			tempArray		 = versionStr.split(" "); 	// ["WIN", "2,0,0,11"]
			tempString		= tempArray[1];			// "2,0,0,11"
			versionArray	  = tempString.split(",");	// ['2', '0', '0', '11']
		} else {
			versionArray	  = versionStr.split(".");
		}
		var versionMajor	  = versionArray[0];
		var versionMinor	  = versionArray[1];
		var versionRevision   = versionArray[2];

			// is the major.revision >= requested major.revision AND the minor version >= requested minor
		if (versionMajor > parseFloat(reqMajorVer)) {
			return true;
		} else if (versionMajor == parseFloat(reqMajorVer)) {
			if (versionMinor > parseFloat(reqMinorVer))
				return true;
			else if (versionMinor == parseFloat(reqMinorVer)) {
				if (versionRevision >= parseFloat(reqRevision))
					return true;
			}
		}
		return false;
	}
}

function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
	return src.replace(/\?/, ext+'?'); 
  else
	return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '';
  if (isIE && isWin && !isOpera)
  {
	str += '<object ';
	for (var i in objAttrs)
	{
	  str += i + '="' + objAttrs[i] + '" ';
	}
	str += '>';
	for (var i in params)
	{
	  str += '<param name="' + i + '" value="' + params[i] + '" /> ';
	}
	str += '</object>';
  }
  else
  {
	str += '<embed ';
	for (var i in embedAttrs)
	{
	  str += i + '="' + embedAttrs[i] + '" ';
	}
	str += '> </embed>';
  }

  document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
	AC_GetArgs
	(  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
	 , "application/x-shockwave-flash"
	);
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
	AC_GetArgs
	(  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
	 , null
	);
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
	var currArg = args[i].toLowerCase();	

	switch (currArg){	
	  case "classid":
		break;
	  case "pluginspage":
		ret.embedAttrs[args[i]] = args[i+1];
		break;
	  case "src":
	  case "movie":	
		args[i+1] = AC_AddExtension(args[i+1], ext);
		ret.embedAttrs["src"] = args[i+1];
		ret.params[srcParamName] = args[i+1];
		break;
	  case "onafterupdate":
	  case "onbeforeupdate":
	  case "onblur":
	  case "oncellchange":
	  case "onclick":
	  case "ondblclick":
	  case "ondrag":
	  case "ondragend":
	  case "ondragenter":
	  case "ondragleave":
	  case "ondragover":
	  case "ondrop":
	  case "onfinish":
	  case "onfocus":
	  case "onhelp":
	  case "onmousedown":
	  case "onmouseup":
	  case "onmouseover":
	  case "onmousemove":
	  case "onmouseout":
	  case "onkeypress":
	  case "onkeydown":
	  case "onkeyup":
	  case "onload":
	  case "onlosecapture":
	  case "onpropertychange":
	  case "onreadystatechange":
	  case "onrowsdelete":
	  case "onrowenter":
	  case "onrowexit":
	  case "onrowsinserted":
	  case "onstart":
	  case "onscroll":
	  case "onbeforeeditfocus":
	  case "onactivate":
	  case "onbeforedeactivate":
	  case "ondeactivate":
	  case "type":
	  case "codebase":
	  case "id":
		ret.objAttrs[args[i]] = args[i+1];
		break;
	  case "width":
	  case "height":
	  case "align":
	  case "vspace": 
	  case "hspace":
	  case "class":
	  case "title":
	  case "accesskey":
	  case "name":
	  case "tabindex":
		ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
		break;
	  default:
		ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
	}
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}



This really should be simpler than this. Yes I did place this file in the same directory.

thanks.
Was This Post Helpful? 0
  • +
  • -

#6 LadynRed  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 17-August 05

Re: Flash doesn't show up in html file on the web

Posted 08 February 2008 - 07:31 AM

I have found this to be an issue with DW's active content script, it never seems to work right.
I find the better solution is to use a solution like swfObject, it's easy to implement and works with very few problems on all browsers that I've tested.
Was This Post Helpful? 0
  • +
  • -

#7 l29go  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 04-February 08

Re: Flash doesn't show up in html file on the web

Posted 11 February 2008 - 12:25 PM

Thank you LadynRed. That worked for me, but I still think that I might of had an issue with my router or host.

the site:

http://blog.deconcept.com/swfobject

is where I was able to download this javascript and directions on how to implement it.
Was This Post Helpful? 0
  • +
  • -

#8 dubs07  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 107
  • Joined: 03-January 08

Re: Flash doesn't show up in html file on the web

Posted 16 February 2008 - 12:41 PM

o.O i could never do flash but glad ladynred helped you
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1