In AIR, TextSnapshots are not properly working when used in mx.core.Window's subclass. Details of the scenario is as under:
Create and open object of custom subclass of Window in Adobe AIR. Within this subclass do the following: Load the swf file: var loader:Loader = new Loader(); loader.load(new URLRequest(urlOfSWF)); Get the TextSnapshot from the Loader's content: var mc:MovieClip = loader.content as MovieClip; var textsnap:TextSnapshot = mc.textSnapshot; Now call: var ret:String = textsnap.getText(10, 20);
The returned string is empty even the textsnap.charCount is larger. Similarly textsnap.hitTestTextNearPos always return -1.
But if the same process is done in the main AIR application instead of within Window subclass, then all works as expected.
Does Textsnapshot work within "Window"? Is there any thing wrong being done in above steps?