macbook localhost cannot display webpage

limazita

Registered
Hi,

I am trying to use the localhost server on my macbook for website development (instead of doing testing by ftp). I downloaded the files from my webserver to the Site folder on my macbook. The Apache is running. My site is flash and make use of the SWFAddress class. The AC_RunActiveContent.js file is in the same folder as the index.html file. When I try to open the page http://localhost/~USERNAME/mysite in firefox, the title and favicon loaded properly, but the embedded flash could not be displayed. However, the same set of files works alright on the remote web server.

I thought it might be problem with the directory and I have tried ./swf/home.swf, swf/home.swf, /swf/home.swf in the index.html file but none work.

What may be the problem?

The directory structure is as follows :

mysite
index.html
AC_RunActiveContent.js
swf (folder)
home.swf

Code:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<link rel="icon"  href="favicon.ico"/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Photography</title>
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
</head>
<body bgcolor="#ffffff">
<p align = "center">
<!--url's used in the movie-->
<!--text used in the movie-->
<!--
PHOTOGRAPHY
-->
<!-- saved from url=(0013)about:internet -->
<script language="javascript">
	if (AC_FL_RunContent == 0) {
		alert("This page requires AC_RunActiveContent.js.");
	} else {
		AC_FL_RunContent(
			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
			'width', '1000',
			'height', '700',
			'src', 'swf/home',
			'quality', 'high',
			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			'align', 'middle',
			'play', 'true',
			'loop', 'true',
			'scale', 'showall',
			'wmode', 'window',
			'devicefont', 'false',
			'id', 'swf/home',
			'bgcolor', '#ffffff',
			'name', 'swf/home',
			'menu', 'true',
			'allowFullScreen', 'false',
			'allowScriptAccess','sameDomain',
			'movie', '../swf/home',
			'salign', ''
			); //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,0,0" width="1000" height="700" id="swf/home" align="middle">
	<param name="allowScriptAccess" value="sameDomain" />
	<param name="allowFullScreen" value="false" />
	<param name="movie" value="/swf/home.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />	
	<embed src="/swf/home.swf" quality="high" bgcolor="#ffffff" width="1000" height="700" name="swf/home" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
	</object>
</noscript>
</p>
</p>
</body>
</html>

Thanks a lot for taking a look
 
Code:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<link rel="icon"  href="favicon.ico"/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Photography</title>
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
</head>
<body bgcolor="#ffffff">
<p align = "center">
<!--url's used in the movie-->
<!--text used in the movie-->
<!--
PHOTOGRAPHY
-->
<!-- saved from url=(0013)about:internet -->
<script language="javascript">
	if (AC_FL_RunContent == 0) {
		alert("This page requires AC_RunActiveContent.js.");
	} else {
		AC_FL_RunContent(
			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
			'width', '1000',
			'height', '700',
			'src', 'swf/home',
			'quality', 'high',
			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			'align', 'middle',
			'play', 'true',
			'loop', 'true',
			'scale', 'showall',
			'wmode', 'window',
			'devicefont', 'false',
			'id', 'swf/home',[
			'bgcolor', '#ffffff',
			'name', 'swf/home',
			'menu', 'true',
			'allowFullScreen', 'false',
			'allowScriptAccess','sameDomain',
			[b]'movie', '../swf/home',[/b]
			'salign', ''
			); //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,0,0" width="1000" height="700" id="swf/home" align="middle">
	<param name="allowScriptAccess" value="sameDomain" />
	<param name="allowFullScreen" value="false" />
	<param name="movie" value="/swf/home.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />	
	<embed [b]src="/swf/home.swf"[/b] quality="high" bgcolor="#ffffff" width="1000" height="700" name="swf/home" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
	</object>
</noscript>
</p>
</p>
</body>
</html>

Look at the bolded text above: you're using two different paths to reference the movie.

Try using just "swf/home.swf" where you reference the movie file, in all places.

Not to mention that the two periods in "../swf/home" mean "one directory higher than my current directory." If you want to reference the swf folder that is in the same directory as the file you're referencing it from, you want to use "./swf/home", not "../swf/home."
 
Thanks for ur reply. I already tried that. I changed all the swf/home or ../swf/home.swf or whatever to swf/home.swf but still the flash does not load.

I am posting this index.html coz despite all the discrepancies, it works on the remote server
 
Is your directory structure on your local machine identical to the directory structure on the remote server? Is the swf directory present on your local machine, located in the same directory as the index.html file, and is home.swf present in the swf directory?
 
The directory structure is exactly the same, I can assure you.

I used to do the testing by ftping, but now I want to set it up locally.

I wonder if it has anything to do with the SWFAddress class.
 
Back
Top