Is there a standard copy-paste method for safely placing SWF on a web page?

While embedding SWF in HTML is not too complicated, there are a few subtleties for different browsers, determining whether Flash is available, etc. To enable AJAX, there are standard code snippets that you can use to save yourself from having to cope with all cases ... is they a similar "reference implementation" for embedding SWF that covers all bases?

+3
source share
5 answers

Is there a standard? Unfortunately no. Desirable points of the Flash implementation method are:

  • modern browser compatible
  • IE compatible
  • antique browser compatible
  • Flash ( ) IE
  • JavaScript

, . 6 , , .

, , - , Flash Satay:

<object type="application/x-shockwave-flash" data="file.swf" width="x" height="y">
    <param name="movie" value="file.swf" />
    (Non-Flash content here)
</object>

ALA , Flash, ; . 3 5. . 5 : Flash , , , , .

, 3 ; Netscape 4 IE4 . , . , ActiveX , IE:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="x" height="y">
    <param name="movie" value="file.swf" />
    <embed type="application/x-shockwave-flash" src="file.swf" width="x" height="y" />
</object>

Flash. 4 7 6.

, , SWFObject, JavaScript Flash . , , , 8. , , 8 6.

+3

Apple (, )

, HTML. EMBED, OBJECT. , .

Adobe (, )

OBJECT Windows EMBED Netscape Navigator (Macintosh Windows) Internet Explorer (Macintosh), Macromedia Flash Player. Internet Explorer Windows ActiveX Macromedia Flash- Netscape plugin Macromedia Flash. .

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
       codebase="http://download.macromedia.com/pub/
                 shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
          WIDTH="550"
         HEIGHT="400"
             id="myMovieName">
    <PARAM NAME=movie VALUE="myFlashMovie.swf">
    <PARAM NAME=quality VALUE=high>
    <PARAM NAME=bgcolor VALUE=#FFFFFF>
    <EMBED href="/support/flash/ts/documents/myFlashMovie.swf"
        quality=high
        bgcolor=#FFFFFF
          WIDTH="550"
         HEIGHT="400"
           NAME="myMovieName"
          ALIGN=""
           TYPE="application/x-shockwave-flash"
    PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
    </EMBED>
</OBJECT>
+1

Flash, , SWFObject. , ? :

+1

I would recommend SWF Object compared to all other parameters, because it creates an html standard and is really easy to configure.

+1
source
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script> 
<div id="myvideo"></div>
<script type="text/javascript">
var params = { allowScriptAccess: "always" };
var atts = { id: "myplayerid1" };
swfobject.embedSWF("http://www.youtube.com/v/gRvUpoTT-Bo&hl=pt-br&fs=1&enablejsapi=1&playerapiid=myplayerid1&version=3", "myvideo", "425", "344", "8", null, null, params, atts);
</script>

It could be an easy way to use js script to test any code ... that helped me try a lot of things

0
source

Source: https://habr.com/ru/post/1718926/


All Articles