user2816456
user2816456

Reputation: 597

How to count number of Flash objects on a webpage

I was wondering what all the possible tags for Flash objects are:

I have read at these links that they will be in either embed or object tags: http://www.w3.org/wiki/HTML/Elements/embed http://www.w3.org/wiki/HTML/Elements/object

After doing some research, it appears that there are several ways to place Flash on a website

<object type="application/x-shockwave-flash">
  <video controls src="http://video.example.com/vids/315981">
    <a href="http://video.example.com/vids/315981">View video</a>.
  </video>
</object>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
  <object type="application/x-shockwave-flash" data="myContent.swf">
  </object>
</object>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
  <embed type="application/x-shockwave-flash">
  </embed>
</object>

Am I missing a way to embed a Flash video? I want to be comprehensive in taking care of all cases.

Note, classid seems to be an obsolete field, but I still need to take it into account for older websites.

Upvotes: 0

Views: 119

Answers (2)

Rumen Jekov
Rumen Jekov

Reputation: 1675

The classid attribute provides a reference that the browser can use to understand how the object should be implemented.

What is a CLSID? A Class ID (CLSID) is a 128 bit (large) number that represents a unique id for a software application or application component. Typically they are displayed like this "{AE7AB96B-FF5E-4dce-801E-14DF2C4CD681}".

You can think of a CLSID as a "social security number" for a piece of software, or a software component.

The classid for flash objects is classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" as explained in this Adobe article

http://helpx.adobe.com/flash/kb/object-tag-syntax-flash-professional.html

As to your other question: "Also, are the embed and the object normally used together to accomodate the different browsers?" - Yes, they are used together to ensure that the flash will be played in IE, Firefox, Chrome and other popular browsers.

Upvotes: 1

Rumen Jekov
Rumen Jekov

Reputation: 1675

The tag is recognized by Internet Explorer, while Firefox and Chrome use the tag to render the flash, e.g.

<object width="150" height="150" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<param name="Movie" value="/aspnet-ajax/Editor/Img/UserDir/Marketing/ASP_AJAX_banner.swf">
<param name="play" value="true">
<param name="quality" value="high">
<param name="wmode" value="transparent">
<param name="loop" value="false">
<param name="menu" value="false"><embed src="/aspnet-ajax/Editor/Img/UserDir/Marketing/ASP_AJAX_banner.swf" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" wmode="transparent" loop="false" menu="false" height="150" width="150"></object>

As you can see the object tag has a classid attribute to show that the object is of type flash. The embed tag has a type property which specified that the object is of type application/x-shockwave-flash. The similarities between both tags are the wmode, quality, loop attributes and the movie and src values containing the location to the swf file. These could be the strings to look for in your custom code.

Upvotes: 1

Related Questions