a7mdfm / flexpaper

Automatically exported from code.google.com/p/flexpaper
1 stars 0 forks source link

Suggestion: Highlight all words found in a document using search #122

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
It would be nice to highlight all found words in the document. Now only one 
word is highlighted. If you scroll down the text, it would be pleasant to see 
all found words highlited. 

Original issue reported on code.google.com by kata...@gmail.com on 11 Oct 2010 at 9:56

GoogleCodeExporter commented 8 years ago

Original comment by erik.eng...@gmail.com on 13 Oct 2010 at 7:57

GoogleCodeExporter commented 8 years ago
Additionally it should highlight it in MAGENTA or NEON GREEN, I find myself 
straining to scan the page for where the highlight occured.  

Original comment by Anson....@gmail.com on 15 Oct 2010 at 6:23

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago

Original comment by erik.eng...@devaldi.com on 16 Oct 2010 at 11:37

GoogleCodeExporter commented 8 years ago
Yaa Im also looking forward to see the "search text" 
should be highlighted in all occurrences...
And one more request to our great developers..
how can i pass search term to the loading document..so that it will highlight 
the search term automatically when it is loaded..
please guide me if any work arounds..
thank you in advance

Original comment by stylee...@gmail.com on 22 Jan 2011 at 6:31

GoogleCodeExporter commented 8 years ago
I have not played with the code since a few months ago... To have the text 
searched automatically when the document is loaded, my first guess would be to 
modify the "documentLoadedHandler" function in "FlexPaperViewer.mxml":

protected override function documentLoadedHandler(event:Event):void{
  spin1.visible = false;
  lblProgress.visible = false;
  spin1.stop();
  bttnInfo.visible = true;

  if(StartAtPage!=1&&!isNaN(StartAtPage)){paper1.gotoPage(StartAtPage);}
  super.documentLoadedHandler(event);

  // add this line here:
  paper1.searchText(txtSearch.text);
}

Maybe this will work.

Original comment by FL5...@gmail.com on 22 Jan 2011 at 4:02

GoogleCodeExporter commented 8 years ago
Or if you meant highlighting the searched term automatically as you are tipping 
each letter in the search box, this would be completely different. But I have 
it working pretty well with no bug if anyone is interested.

Original comment by FL5...@gmail.com on 22 Jan 2011 at 4:09

GoogleCodeExporter commented 8 years ago
In reference to my Comment #6... maybe you better add it this way to avoid 
useless operation or maybe infinite loop...

  // add this line here:
  if (txtSearch.text.length>0) {
    paper1.searchText(txtSearch.text);
  }

Sorry for the multiple posts.  Actually, I'm not even a developper and I didn't 
know anything about Flash or Flex before I discovered FlexPaper and wanted to 
modify it for my needs (search not sensitive to uppercase/lowercase/accents, 
automatic search while tipping, searchbox changing to green if result found or 
red if none, bigger iconbar and icons for touchscreen, one button zoom+ and one 
button zoom-) and after a few weeks I achieved it, and with FlashDevelop :-)

Original comment by FL5...@gmail.com on 22 Jan 2011 at 4:31

GoogleCodeExporter commented 8 years ago
Dear Franco...
Thank you for your reply..I did modified event documentLoadedHandler() in the 
file "FlexPaperViewer.mxml" as you suggested to highlight the search terms by 
passing it while the document being loaded..

I really stuck in getting modified falshpaperviewer.swf after the customization 
as im very new to flex development(basically im Asp.net developer).
I really hope to get help and guidance from you Franco.

Thank you in advance.

Regards
Pratap

Original comment by stylee...@gmail.com on 28 Jan 2011 at 12:18

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I'm using FlexDevelop (under Windows).  Here's the steps I did to reach a 
functional state with my own compiled FlexPaper:

1 - Install Flex SDK 3.X

2A - Install FlashDevelop

2B - Install the "exportSWC" plugin http://sourceforge.net/projects/exportswc/ 
(double-click the plugin to install automatically)

3 - Get Flexpaper sources:
    svn checkout http://flexpaper.googlecode.com/svn/trunk/ flexpaper-read-only

4 - in FlashDevelop Menu: Tools - Program Settings - Plugins/AS3Context) - Flex 
SDK Location:  ""  (point to your Flex SDK 3.X)

5 - Open FlexPaper.as3proj click the red icon "Build SWC/MXI".
Copy the generated file "FlexPaper/bin/FlexPaper.swc"
inside a completely new AS3 Project such as (for exemple "MyFlexPaper") in 
"MyFlexPaper/lib/FlexPaper.swc"

6 - Open the new projet file MyFlexPaper.as3proj and do "Build Project"

7 - The final result would be "MyFlexPaper/bin/MyFlexPaper.swf"

Original comment by FL5...@gmail.com on 28 Jan 2011 at 8:18

GoogleCodeExporter commented 8 years ago
Dear Franco..

I am very happy to see your reply in detail..but poor me couldn't handle in 
getting the proper FlexPaper.swc as im really unaware of flex programming 
basics.
Can you please provide me the proper FlexPaperviewer.swf with that modified 
documentLoadedHandler(event:Event).

I am really in big hurry in preparing a demo for my client. After demo success 
i am really planning to take unlimited license + Annotations plug-in 

So I hope you understand my situation please do the needful. Thank you very 
much.
Im already purchased single user license bound to my 183.83.245.87
Hoping for the best from you.

Pratap.k
pratapk@globaltouch.in

Original comment by stylee...@gmail.com on 31 Jan 2011 at 7:35

GoogleCodeExporter commented 8 years ago
I'm sorry but I don't have the time to code these additional features for your 
project.  As I mentionned before, I'm not a developper.  Everytime I want to 
modify the code, I have to get familiar with the existing code and search over 
Internet to learn more about the functions I want to use.

Original comment by FL5...@gmail.com on 6 Feb 2011 at 12:47

GoogleCodeExporter commented 8 years ago
Added in 1.4.2

Original comment by erik.eng...@devaldi.com on 11 Apr 2011 at 12:31

GoogleCodeExporter commented 8 years ago
(new property added in 1.4.2 for this, "SearchMatchAll")

Original comment by erik.eng...@devaldi.com on 11 Apr 2011 at 12:32