Using SWF Metadata in Flash 8
Listen to this article
:: Talkr
What is SWF Metadata?
Simply put SWF Metadata is something similar to HTML meta tags. SWF Metadata is a new feature in Flash 8 that helps search engines like Google index Flash contents. This was something which was not directly possible in Flash and people used to rely on workarounds to achieve this. SWF Metadata is specified in RDF (Resource Description Framework) which is stored in the SWF which search engines can use to find relevant keywords.
How to use SWF Metadata?
The metadata for a Flash document can be specified in the document properties (Modify > Document... [Ctrl+J]). You will find two text areas titled "Title" and "Description". These are the two values which are used as the SWF Metadata for the document.

After you have specified these two values and compile your movie, the metadata values are added to the header of the SWF file which the search engine can use to index your content.
Other ways of specifying SWF metadata
If you are webmaster and want to include a standard set of keywords/title/description for all your Flash content, the JSAPI DOM provides methods by which you can insert such title and description into your document. You can set metadata using the JSAPI function document.setMetadata(). The setMetadata function takes a XML as the parameter and sets the metadata of the document. The XML that is passed to the setMetadata function can be in three formats. The various formats are described here.
The simplest form of which is :
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
<rdf:Description rdf:about='' xmlns:dc='http://purl.org/dc/1.1/' dc:title='Last ActionScript Hero : SWF Metadata Tutorial' dc:description='This is a tutorial that teaches how to use SWF Metadata in Flash 8' />
<rdf:Description rdf:about='' xmlns:xmp='http://ns.adobe.com/xap/1.0/' xmp:CreateDate='2004-10-12T10:29-07:00' xmp:CreatorTool='Flash Authoring WIN 8,0,0,215' />
</rdf:RDF>
Is SWF Metadata used by all popular search engines to index contents?
The answer is NO. Not all popular search engines are build to index pages that have SWF metadata. Google for sure does this though. Do you really bother about others ;)
How do I make sure the metadata I specified for my document is embeded into the SWF?
Simple, if you look at the size report generated by Flash for your movie, you will see a row titled "Metadata" which will look like this :
meta.swf Movie Report
----------------------
Metadata
--------
Bytes Value
----- -----
227 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/1.1/"><dc:title>Last ActionScript Hero : SWF Metadata Tutorial</dc:title><dc:description>This is a tutorial that teaches how to use SWF Metadata in Flash 8</dc:description></rdf:Description></rdf:RDF>
To generate size report for you movie goto File > Publish Settings... > Flash > Options and check the "Generate Size Report" checkbox.
How do I search Google for SWF's that has SWF metadata embeded in them?
You can do a search by filetype and keywords in Google. For example a search for filetype:swf +"tutorial" in Google would return those SWF's which are associated with the keyword tutorial in them.
If you are looking for a specific SWF in a specific site you can use the site: and filetype: keywords in Google to specify the exact filename you are looking for in a site.
Example :
filetype:swf site:lastashero.com
Questions & Comments
hi,
good tutorial, thanks !
Last month, i've create a simple Command on my blog about metadata
> http://jeanphiblog.media-box.net/dotclear/index.php?2005/09/20/136-flash-8-jsfl-documentsetmetadata
Posted by: jeanphilippe | October 18, 2005 11:23 AM
I am trying to access SWF metadata from within the SWF itself at runtime. I would prefer to do it directly through player, or failing that, through JavaScript/ExternalInterface. Calling a server-side script or using the Flash IDE/panels aren't viable options. Any ideas on how to do this?
Posted by: Craig Babcock | March 16, 2006 12:12 PM
Great reading, keep up the great posts.
Peace, JiggaDigga
Posted by: JiggaDigga | April 7, 2006 11:18 AM
WHAT IS META DATA IN FLASH.
Posted by: RAHUL | January 9, 2007 05:36 PM
Hi,
will google be able to read the text in my movie if i render as html and make it selectable? will it pickup the xml file too?
Posted by: MoonFlower | June 16, 2007 01:50 PM