Jump to content

can you explain this code please ?

- - - - -

  • Please log in to reply
1 reply to this topic

#1
depro

depro

    Newbie

  • Members
  • Pip
  • 1 posts
hi:
I want to put a flash file (swf) in the index of my website in widget .. I have (in the admin) a box to put the code of the widget .. and I want to make the flash appear in that widget with a destination link for it (open in a new window) ..
I tried a lot and didn't get anywhere .. so I thought of bringing a youtube video .. they give you the embeeding code in youtube and you put in in your page .. I copied it and putten in the widget's code and the video appeard in my widget .. but when I replaced it with mr swf file .. it appeared but without loading and without the destination link ..

so can you explain this YOUTUBE code for my please .... thanx


<object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/8d0d31_OAvU?fs=1&hl=ar_EG"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/8d0d31_OAvU?fs=1&hl=ar_EG" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>


#2
Vladimir

Vladimir

    Learning Programmer

  • Members
  • PipPipPip
  • 79 posts
Hi depro,

To embed swf in your HTML use swfobject. There is comprehensive documentation. If you don't want to read it, you can just download swfobject, extract it to your HTML files dir and use this HTML template (replace myContent.swf with you file, note that you have to replace it twice):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
  <head>
    <title>SWFObject - step 3</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <script type="text/javascript" src="swfobject.js"></script>

    <script type="text/javascript">
    swfobject.registerObject("myId", "9.0.115", "expressInstall.swf");
    </script>

  </head>
  <body>
    <div>

      <object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="780" height="420">

        <param name="movie" value="myContent.swf" />
        <!--[if !IE]>-->
        <object type="application/x-shockwave-flash" data="myContent.swf" width="780" height="420">
        <!--<![endif]-->
          <p>Alternative content</p>
        <!--[if !IE]>-->
        </object>
        <!--<![endif]-->
      </object>
    </div>
  </body>
</html>





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users