swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swftools-common] pdf2swf getTextSnapshot(); in AVM2 (Flash9) Movie?


From: Syed Fawad
Subject: [Swftools-common] pdf2swf getTextSnapshot(); in AVM2 (Flash9) Movie?
Date: Thu, 18 Sep 2008 11:47:35 +0600

Hello,

I read previous posts on getTextSnapshot(); method and its usage to search and highlight strings in swfs converted to pdfs using pdf2swf. I checked and double checked but I am unable to find this method in the swf I'm loading. I need to know if this method exists in swfs exported as AVM2/Flash9.

Here's my method:

public function SearchText(strText:String):void{
            var mc:MovieClip = ldrPage.content as MovieClip; // ldrPage is an instance of Loader() that is used to load the converted swf.
            var my_snap:TextSnapshot = mc.getTextSnapshot(); //<<<<<<<<<<<<<<<<<<<<<< (compiler throws error here)>>>>>>>>>>>>>>>>
               var start_pos:Number = 0;
           
            start_pos = my_snap.findText ( start_pos, strText, false );
            while ( start_pos > 0 )
            {
                my_snap.setSelected( start_pos, start_pos + strText.length, true );
                start_pos += strText.length;
                start_pos = my_snap.findText ( start_pos, strText, false );
            }
        }


Here's the command I used to export my pdf:

pdf2swf --pages 1 -T 9 -f input\Unit1.pdf output\1.swf

So far I'm trying to work with a single page.

Many thanks.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]