Hi,

One correction is that charCount is valid and non-zero but other methods
e.g. don't work .
Secondly in main AIR window it works but not 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?

Thanks,
Ahmed


On Fri, Jun 26, 2009 at 6:28 PM, Muhammad Ahmed Ullah <
[email protected]> wrote:

> Hi,
>
> The swf files generated from the pdf2swf tool, are perfectly loaded and
> viewable in Adobe AIR application but the TextSnapshot got from these
> doesn't contain valid text information e.g. charCount=0. But the same swf if
> loaded and viewed in Flex web application gives text information correctly
> through TextSnapshot. Any ideas?
>
> Thanks,
> Ahmed
>
>

Reply via email to