|
From: | Andreas Haufler \(scireum\) |
Subject: | RE: [Swftools-common] Text search in SWF |
Date: | Thu, 20 Aug 2009 11:21:36 +0200 |
Change
line 17 to: snapText
= (img.content as MovieClip).textSnapshot; …then
you can happily fall asleep… (you
need to geht the textSnapshot
of the loaded MovieClip, not the loader itself. This
is also the reason why you need Flash 9 swfs which
you load. Because older swfs are loaded as AVM1Movie
(or something like this) which don’t support textSnapshot.) If you ever plan to load those SWFs via the
internet, make sure your security domain and stuff is set currently. We
do something like: if
(Security.sandboxType == Security.REMOTE)
{ loader.loaderContext = new LoaderContext(false,
null, SecurityDomain.currentDomain); } …before
we load the swf. Best
regards andy freundliche Grüße TTI GmbH - TGU scireum, Friedrichstr. 8, 70736
Fellbach TTI GmbH - Zentrale, Nobelstr. 15, 70569
Stuttgart Geschäftsführer: Prof. Dr.-Ing. Bernd Bertsche,
Elgar Rödler Amtsgericht Stuttgart, HRB 19455 From: Pratyus Patnaik [mailto:address@hidden I used the the swf file you had
sent me (aha_1.swf). It still gave me the same error. Failed search and
returned 0 for snapText.charCount.toString(). On Thu, Aug 20, 2009 at 1:30 AM, Pratyus Patnaik <address@hidden>
wrote: Hey Andy,
On Thu, Aug 20, 2009 at 1:19 AM, Andreas Haufler (scireum)
<address@hidden>
wrote: Hey there, are you using pdftools 0.9.0? Check via: pdf2swf --version A attached the converted SWF which works fine with our viewer. The SWF
you supplied did not work L. If the problem persists (you need pdf2swf 0.9.0), feel free to ask
again. Best regards Andy freundliche Grüße TTI GmbH - TGU scireum,
Friedrichstr. 8, 70736 Fellbach TTI GmbH - Zentrale, Nobelstr.
15, 70569 Stuttgart Geschäftsführer: Prof. Dr.-Ing.
Bernd Bertsche, Elgar Rödler Amtsgericht Stuttgart, HRB
19455 From: Pratyus Patnaik [mailto:address@hidden] Thanks, but the search still fails :( On Wed, Aug 19, 2009 at 11:28 PM, Andreas Haufler (scireum) <address@hidden> wrote: freundliche Grüße TTI GmbH - TGU scireum,
Friedrichstr. 8, 70736 Fellbach TTI GmbH - Zentrale, Nobelstr.
15, 70569 Stuttgart Geschäftsführer: Prof. Dr.-Ing.
Bernd Bertsche, Elgar Rödler Amtsgericht Stuttgart, HRB
19455 From: Andreas Haufler (scireum) [mailto:address@hidden] Hi Pratyus, you probably want to add the option –T 9 which sets the player version
of the resulting swf to 9. This changes the way, the swf is loaded by your flex
application and permits to use TextSnapshot. You also should keep the instance
of TextSnapshot in a variable which is only filled once after the file was
loaded, otherwise some strange errors might occur. Example command: pdf2swf -f -T 9 in.pdf --output out.swf best regards Andy freundliche Grüße TTI GmbH - TGU scireum,
Friedrichstr. 8, 70736 Fellbach TTI GmbH - Zentrale, Nobelstr.
15, 70569 Stuttgart Geschäftsführer: Prof. Dr.-Ing.
Bernd Bertsche, Elgar Rödler Amtsgericht Stuttgart, HRB
19455 From: swftools-common-bounces+aha=scireum.de@nongnu.org [mailto:swftools-common-bounces+aha=scireum.de@nongnu.org] On Behalf Of Pratyus
Patnaik I trying to build a simple application in flex in which I render a swf in
the application. I want to enable user to search text using a textbox
(id="SearchInpt") and button (id="SearchBtn"). <?xml version="1.0"
encoding="utf-8"?> |
[Prev in Thread] | Current Thread | [Next in Thread] |