Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bntz313

macrumors 6502
Original poster
Jul 11, 2007
399
0
How come I upload an swf file of my website and when I go to it is says index of and doesn't go to the home page, but will have an link to the swf file. I'm using 000webhost to host my site. I upload the files to the public_html folder
 
You successfully uploaded a .swf file, congratulations. But that's all?!

Now you need to create the HTML in your index.html or index.php or whatever to tell the browser what to do with that Flash file. Create a simple HTML page that includes the proper tags to tell your browser to load the Flash plugin. Here is an example of that tag:
HTML:
<object width="550" height="400">
<param name="movie" value="filename.swf">
<embed src="filename.swf" width="550" height="400">
</embed>
</object>

Hope your site doesn't force users to use Flash! Not a best practice.

-jim
 
No they don't force me to use flash, but I don't know how to write html. and wanted to make an portfolio.
 
It helps to know HTML, but you don't need to - all you need to do is use the Adobe Flash publish command, which according to the Adobe help page does this:

Publishing overview
By default, the Publish command creates a Flash SWF file, an HTML document that inserts your Flash content in a browser window, and a JavaScript file labeled AC_OETags.js that lets your SWF file play automatically in active content-compliant browsers. The Publish command also creates and copies detection files for Macromedia Flash 4 from Adobe and later. If you change publish settings, Flash saves the changes with the document. After you create a publish profile, export it to use in other documents, or for others working on the same project to use.

Once you use the publish command, upload the HTML document, the .swf and any other files it generates all into your public_html folder. This might resolve your issue completely.

IF IT DOESN'T...

Now, I hate to complicate things, but you've already got an existing index.html which is an HTML file that loads automatically when the site is visited via browser. However, it does not include the .swf file, it has other files involved, a crazy huge image of unknown purpose and it also is EXTREMELY POORLY WRITTEN with numerous errors in syntax and stucture breaking all kinds of rules to the point of silliness. It seems to be a default file from hosting24.com, I will post the source, verbatim, here simply for other gurus watching this topic to see what I mean and maybe get a good laugh:

HTML:
<html>
<head>
<title>Website</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- ImageReady Slices (Website.psd) -->
<img src="images/Index.gif" width="768" height="1024" alt="">
<!-- End ImageReady Slices -->
</body>
</html>
<!-- www.000webhost.com Analytics Code -->
<script type="text/javascript">
var websiteID='anthonybetancourt.com';
</script>
<script type="text/javascript" src="http://analytics.hosting24.com/s.php"></script>
<noscript>
<a href="http://www.hosting24.com/"><img src="http://analytics.hosting24.com/s.php?websiteID=anthonybetancourt.com" alt="web hosting" /></a>
</noscript>
<!-- End Of Code -->

Love the script added after the closing HTML tag, huh? Okay, now for the fix of that document:

Below is a modified and corrected version which means you should backup the original, use this instead, changing "Welcome to my website" to whatever you want for the title of the page, replace filename.swf and the height (replace 440) and width (replace 550) to match your Flash presentation, but leave the rest alone, then save and upload. For the record I've included the analytics code and that large image Index.gif referenced in the code. I did this to keep exisiting elements intact, making an assumption you need them:

HTML:
<html>
<head>
<title>Welcome to my website</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script type="text/javascript">
var websiteID='anthonybetancourt.com';
</script>

</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- ImageReady Slices (Website.psd) -->
<img src="images/Index.gif" width="768" height="1024" alt="">
<!-- End ImageReady Slices -->

<!-- EDIT THE FILENAME.SWF AND DIMENSIONS BELOW IN PIXELS -->
<object width="550" height="400">
<param name="movie" value="filename.swf">
<embed src="filename.swf" width="550" height="400">
</embed>
</object>

<!-- www.000webhost.com Analytics Code -->
<script type="text/javascript" src="http://analytics.hosting24.com/s.php"></script>
<noscript>
<a href="http://www.hosting24.com/"><img src="http://analytics.hosting24.com/s.php?websiteID=anthonybetancourt.com" alt="web hosting" /></a>
</noscript>
<!-- End Of Code -->

</body>
</html>

Now if that looks crazy via browser and doesn't display what you want, toss it. Then simply use the HTML file generated by the Adobe publish command as I discussed at the top of this reply, but also post the complete source here and we can help you customize it to include ONLY the elements you want, i.e. tell us what you want in terms of layout.

TIP: Learn HTML - start here for a basic tutorial at W3C schools, spend the time learning how tags and attributes work, and always use Google to research something you don't understand and ask here if you need more detailed help. Always backup original files before making any changes and uploading.

-jim
 
Well its just an image now that I created it PS /the basic layout with no working buttons/pages yet. This is breaking rules? I have an html index file and the image named index .gif. Thanks for the help an will try this out.
 
Dude, why are you using tables in your site design? It's 2008, not 2000 :D
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.