[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Swftools-common] Help with search highlight
From: |
jriggio |
Subject: |
Re: [Swftools-common] Help with search highlight |
Date: |
Mon, 22 Dec 2008 11:54:22 -0500 (EST) |
User-agent: |
SquirrelMail/1.4.13 |
Thanks for your help. I have seen that example but still not having any
luck with it. This is what I have been doing maybe you can help me out.
CODE:
_root.createEmptyMovieClip("container",1);
container._x = 110;
container._y = 60;
loadMovie("swfs/testM001.swf", "container");
searchText_mc.onRelease = function() {
trace("Start Searching The Doc");
hltext("wonderful");
}
//viewport.loadMovie("swfs/testM001.swf");
function hltext ( txt ) {
//trace("hltext");
var mc = _root.container;
var my_snap:TextSnapshot = mc.getTextSnapshot();
var start_pos:Number = 0;
start_pos = my_snap.findText(start_pos, txt, false);
trace("start_pos : " + start_pos);
while (start_pos > 0) {
trace(start_pos);
my_snap.setSelected(start_pos, start_pos + txt.length, true);
start_pos += txt.length;
start_pos = my_snap.findText(start_pos, txt, false);
}
}
It keeps giving me this output:
Start Searching The Doc
start_pos : -1
before I had it giving me a buch of sets of numbers. I don't know what I
did but I can get that to work again. I just want to search and highlight
text in my swfs. This is driving me mad. Any help would be AWESOME!!!
> On Thu, Dec 18, 2008 at 04:40:32PM -0500, address@hidden
> <address@hidden> wrote:
>> Im still having trouble getting a search working. Im stuck on how to
>> implement it. I want to be able to convert the pdf's to as3 and search
>> the
>> swf. Do you have a example that i can see with this function?
>
> Afraid that so far, all true search implementations are commercial.
>
> But if you're looking for something to start with, the principles
> of text extraction and text highlighting are demonstrated in
> http://www.swftools.org/flash/textsnapshot.html
> .
>
>> it would
>> help me greatly. Also when i do a -T 9 and -t the pages do not stop.
>
> Thanks for reporting this. This was a bug. It'll work again in the next
> snapshot.
>
> Greetings
>
> Matthias
>
>
>
>
>