What are the different options available for implementing a text search in an AIR HTML control? I could think of the following two:
- Implement by injecting a custom javascript - the downside is the script may interfere with ones already loaded with page
- Implement an HTML scrapper and then parse this text in Actionscript, and then using javascript highlight it.
Thoughts are most welcome.
From stackoverflow
-
here's a start: Using HTML in Flex-based Adobe AIR Applications. there's a section on calling javascript.
Sandy : The question is which approach between Javascript and Actionscript is better. -
The best way to perform text search in an HTML control via actionscript is to look for text nodes, extract them, perform a match, and then break the text node into 3 separate nodes: 1. The text node with part before 2. A new highlighted node with search term 3. The text node with the part after.
0 comments:
Post a Comment