swftools-common
[Top][All Lists]
Advanced

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

RE: [Swftools-common] Within SWF search


From: Mark A. Lowe
Subject: RE: [Swftools-common] Within SWF search
Date: Tue, 15 Apr 2008 09:31:47 +1000

Hey mate,

 

Think the example you mentioned was mine. I’ve re-uploaded it for you!

And I’ve copied the email discussion below.

 

The new link is:

 

http://www.multimediaresourceaustralia.com/~temp/searchTextSample.zip

 

Hope this helps!

 

Cheers,

 

Mark.

 


mark lowe
senior multimedia developer

multimedia resource australia

t:

+61 3 9281 3235

m:

+61 424257967

e:

address@hidden

w:

www.mmr.com.au

 

 MMR, Suite 409, 434 St. Kilda Road, Melbourne, 3004

 

 

Hey Jan,

 

I've uploaded a sample to : http://www.multimediaresourceaustralia.com/~temp/searchTextSample.zip

It contains my working PDF file, outputted SWF file, and a flash8 (and Flash CS3) FLA which loads the SWF and has the Search Text button with the hltext function on it.

There are some instructions in the .txt file.

 

Hope this helps!

 

 

mark lowe

senior multimedia developer

multimedia resource australia

t:

+61 3 9602 4750

f:

+61 3 9606 0408

e:

address@hidden

w:

www.mmr.com.au

level 2, 351 elizabeth st, melbourne vic 3000  [ courier correspondence ] p.o. box 205, fitzroy vic 3065 [ all other correspondence ]

 

-----Original Message-----

From: jan bahnsen [mailto:address@hidden

Sent: Friday, November 16, 2007 12:19 AM

To: Mark A. Lowe

Subject: Re: [Swftools-common] PDF2SWF and getTextSnapShot()

 

Hi Mark,

 

great stuff!

 

> If anyone would like some sample files give me a shout,

 

Would really appreciate if you could pop over a sample - will be very useful for better understanding!

 

Cheers, Jan.

 

 

 

2007/11/15, Mark A. Lowe <address@hidden>:

> Many thanks Fabio,

> I've managed to get somewhere with your actionscript.

> I also had a problem with how I was creating my swf from pdf2swf.

> 

> For everyone else make sure you follow these steps:

> 

> 1. Use Flash 8 or previous version (I used 6) with the -T command :

> pdf2swf -T 6 2. Use the -f command for full fonts : pdf2swf -f 3. Test

> your outputted swf with: swfdump -t filename.swf , you should see a list of DEFINETEXT statements and the corresponding text. Due to a font conflict I was seeing DEFINETEXT followed by jumbled up text on my first pdf.

> 4. Test your outputted swf with: swfstrings filename.swf, you should see your text and a LOT of ???????s. Again, I had garbage text when trying to convert my original PDF.

> 

> If the swfdump and swfstrings tests are working, load your pdf2swf.swf into Flash. Publish it for 8.

> I loaded it into a movieclip on my root timeline called 'loader' :

> loader.loadMovie("pdf2swf_files/6new.swf");

> I have a movieclip called 'searchText_mc' and have the following code for it:

> 

> searchText_mc. {

>        hltext ("wonderful");

> }

> 

> And then the hltext is as Fabio provided. This will yellow-highlight all the occurrences of the search string:

> 

> function hltext ( txt )

> {

>        trace("hltext");

>        var mc = _root.loader;

>        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 );

>        }

> 

> }

> 

> If anyone would like some sample files give me a shout,

 

 

 

 

 

 

 

 

 

 

 

 

From: address@hidden [mailto:address@hidden On Behalf Of Dmitry K Valberg
Sent: Tuesday, April 15, 2008 8:12 AM
To: address@hidden
Subject: [Swftools-common] Within SWF search

 

Hello!

 

I know this has been discussed before, but the only sample/example showing how to do search in SWF files produced by PDF2SWF is no longer offline. So I was wondering if there is an simple example on how I can add search functionality to my SWF files?

 

I have been trying my luck with Flex 3 and SWFLoader, sadly even example posted on Adobe Flex 3 reference manual doesn’t work.

http://livedocs.adobe.com/flex/3/html/Working_with_Text_18.html

 

Tried both Flex 3, Flash 9 with all kinds of textfields and types.

 

Thank you,

Dmitry K Valberg

Norway, A-Pressen


reply via email to

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