Question

What are the different options available for implementing a text search in an AIR HTML control? I could think of the following two:

  1. Implement by injecting a custom javascript - the downside is the script may interfere with ones already loaded with page
  2. Implement an HTML scraper and then parse this text in Actionscript, and then using javascript highlight it.

Thoughts are most welcome.

Was it helpful?

Solution

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.

OTHER TIPS

here's a start: Using HTML in Flex-based Adobe AIR Applications. there's a section on calling javascript.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top