PDA

View Full Version : indexing flash movies with swf2html


JÿGius³
03-04-2004, 10:49 PM
Hi all.

I'm wondering if could be possible to index swf files.
There is a software that can be used to extract
text from swf files http://www.macromedia.com/software/flash/download/search_engine/search_engine_faq.html
The problem is that with a pdf file, for instance, you have a link
as follows
<a href="pdf.pdf">click here!</a>.
When you search, phpdig returns you a link to pdf.pdf.
With a flash the problem is a little bit different, because
a flash file is like a "page" inside a host page.
For instance, I have a page and a flash inside it called moog.swf.
Here the page called index.html.


<body>
<object id="c432115683" classid="clsid:"
codebase="http://macromedia.com" width=140 height=120>
<param name=movie value="moog.swf">
<param name=quality value=high><param name="wmode" value="transparent">
<embed name=c432115683 swliveconnect="true"
src="moog.swf" quality=high width=140 height=120
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com">
</embed>
</object>

<a href="pippo.html">ciao</a>
</body>

swf2html extracts the text from moog.swf; when I search for a word
contained in moog.swf, phpdig has to give me a link to index.html,
and not the link to moog.swf. That is, a flash movie is like
a "page slave" (moog.swf) inside the host page (index.html).

swf2html is ready to be used to index very complex flash files.
I've tested swf2html with a 1.8 MB flash movie, and works fine...
It has indexed the file very very quickly:D.

Any ideas:rolleyes: ?

Best regards.

JÿGius³

Charter
03-11-2004, 02:44 PM
Hi. The first thing would probably be to edit one or both of the regex in this (http://www.phpdig.net/showthread.php?postid=2141#post2141) post to allow for the embed tag, maybe something like so depending on placement:

<embed[^>]*src[[:blank:]]*=|

and then the next thing would probably be to account for the content type, external binary, etcetera by following the idea in this (http://www.phpdig.net/showthread.php?threadid=398) thread.