Member Offer
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Embed .SWF files, how to??

Discussion in 'Website Coding & Programming Forum:' started by Stationery Direct, May 11, 2010.

  1. Stationery Direct

    Stationery Direct Administrator Staff Member

    I have been given a couple of files by Adobe that are flash files (.swf), how do I go about displaying these on the forum, in the position of the main banner above?

    To show the animated gifs was easy, we use the following code....

    PHP:
    <a href="http://www.graphicdesignforums.co.uk/graphic-design-competitions/3291-graphic-design-forums-competition.html"><img src="http://www.graphicdesignforums.co.uk/banners/adobe-cs5.gif" alt="WIN ADOBE CS5 PREMIUM EDITION + MUCH MORE" /></a>
    ...but what do I have to change the above code to to display .swf files?

    Any advice is greatly appreciated.

    Cheers

    Damon
     
  2. socreative

    socreative Member

  3. Stationery Direct

    Stationery Direct Administrator Staff Member

    Thanks for that, looks a little complicated for my liking :icon_eek:

    ...may just ask them to supply a different file type :icon_smile:
     
  4. socreative

    socreative Member

    it very easy

    PHP:
    <script type="text/javascript" src="js/swfobject.js"></script>
    <script type="text/javascript">    
            swfobject.embedSWF("flashmovie.swf", "FlashContent", "960", "250", "9.0.0", "expressInstall.swf");
    </script>
    and in your page just create a DIV with the id FlashContent like so

    PHP:
    <div id="FlashContent">
    </
    div>

    the flash movie will be loaded into that div
     
  5. Stationery Direct

    Stationery Direct Administrator Staff Member

    Thank you
    :icon_cheers:
     
  6. DougBarned

    DougBarned Member

  7. AMI Creative

    AMI Creative New Member


    Remember to provide a no-script tag for you alternative content :)
     
  8. socreative

    socreative Member

    i deliberately left it out since Boss Hog was struggling to understand how it works ;)
     
  9. Stationery Direct

    Stationery Direct Administrator Staff Member

    :icon_tongue_smilie::icon_biggrin:
     

Share This Page