swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swftools-common] Re: TextSnapshot issue in Adobe AIR application


From: Muhammad Ahmed Ullah
Subject: [Swftools-common] Re: TextSnapshot issue in Adobe AIR application
Date: Thu, 2 Jul 2009 12:14:55 +0600

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 <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]