Flash flies in iWeb?

Discussion in 'Web Design and Development' started by Soundhound, Jun 4, 2013.

  1. Soundhound macrumors 6502a

    Joined:
    Mar 29, 2006
    #1
    Anybody know how to use .swf files in an iWeb site hosted on Godaddy?

    I'm trying to see how to use a few .swf files (flash) in my site which I built and maintain with iWeb.

    I had set them up back in the .mac days and they were able to work. When .mac ended, I switched the hosting to Dropbox which worked fine (though a little slow) but I guess I hadn't checked those .swf animations. When I was preparing to move the site to GoDaddy recently, the animations weren't working.

    My site is now up and running on GoDaddy and I'd like to get those animations working. I've googled/searched for information, but all the info seems to be about using idisk or .mac. Since those no longer exist, I'm having trouble figuring out how to do it.

    Anybody know how to use .swf files in an iWeb site hosted on Godaddy?
     
  2. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #2
    Before I answer, an FYI:

    Flash is not recommended on web sites these days due to lack of mobile support and it's a proprietary format in disfavor by many developers. It's not dead, but it's fair to say slowly it is being deprecated in the minds of developers, regardless if Adobe still supports it or not.

    As to your question:

    Regardless if you exported from iWeb to godaddy's web space or still host the content on Dropbox courtesy of domain forwarding, to load any Flash file you need the proper HTML such as:

    Method 1: swfoObject (best cross-browser compatible method)

    Download the library here: https://code.google.com/p/swfobject/

    Edit and add to the HEAD area of your HTML document:

    Code:
    <script type="text/javascript" src="swfobject.js"></script>
    
    <script type="text/javascript">
    <!--//
    // Edit to use your path/filename.swf, name of content div for output,
    // width, height and Flash version required
    swfobject.embedSWF("myContent.swf", "myContent", "300", "120", "9.0.0");
    //-->
    </script>
    
    Then in the BODY of your HTML document edit and add:

    Code:
        <div id="myContent">
          <p>Alternative content for those without a flash player, otherwise this is replaced by the Flash by swofObject</p>
        </div>
    Of course you don't need swofObject, the native HTML to load any Flash could be something like this basic and popular example (edit then add):

    Code:
    <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="320" HEIGHT="240" id="Yourfilename" ALIGN="">
    <PARAM NAME=movie VALUE="Yourfilename.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#333399> <EMBED src="Yourfilename.swf" quality=high bgcolor=#333399 WIDTH="320" HEIGHT="240" NAME="Yourfilename" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED> </OBJECT>
    
    The above method is a little flaky in MSIE 9 browsers but it loads the .swf, accounts for size + alignment, parameters and what happens if the user does not have Flash enabled or correct version (present them with a link to download the player).

    It's up to you to know the parameters and style it correctly. These are examples, do not just copy/paste.
     

Share This Page