Uploading Website problem

Discussion in 'Web Design and Development' started by bntz313, Oct 10, 2008.

  1. bntz313 macrumors 6502

    Joined:
    Jul 11, 2007
    #1
    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
     
  2. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #2
    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
     
  3. ChicoWeb macrumors 65816

    ChicoWeb

    Joined:
    Aug 16, 2004
    Location:
    California
    #3
    Why don't you post the link. Hard to say without seeing the code.
     
  4. bntz313 thread starter macrumors 6502

    Joined:
    Jul 11, 2007
  5. bntz313 thread starter macrumors 6502

    Joined:
    Jul 11, 2007
    #5
    No they don't force me to use flash, but I don't know how to write html. and wanted to make an portfolio.
     
  6. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #6
    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:

    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
     
  7. bntz313 thread starter macrumors 6502

    Joined:
    Jul 11, 2007
    #7
    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.
     
  8. bntz313 thread starter macrumors 6502

    Joined:
    Jul 11, 2007
  9. ncmason macrumors regular

    ncmason

    Joined:
    Feb 27, 2007
    #9
    Dude, why are you using tables in your site design? It's 2008, not 2000 :D
     
  10. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #10
    Why are you ignoring the topic (especially it being solved) and making pointless statements?
     

Share This Page