swftools-common
[Top][All Lists]
Advanced

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

Re: [Swftools-common] Highlight text setSelected()


From: Yen Soon Low
Subject: Re: [Swftools-common] Highlight text setSelected()
Date: Thu, 8 May 2014 00:56:40 +0800

I guess it didn't work because I set it only once. Here are the codes:

loader = new Loader();
var url:URLRequest = new URLRequest("paper33.swf");
var loaderContext:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
loader.load(url, loaderContext);
holder.addChild(loader);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,outtest_completeHandler);

protected function outtest_completeHandler(event:Event):void {
var snap:TextSnapshot = MovieClip(loader.content).textSnapshot;
trace(snap.findText(0,"world",false)); //show 6
trace(snap.getText(0,6,false)); //show hello w
snap.setSelectColor(0xFFEF00); //doesn't work
snap.setSelected(0,6,true);    //doesn't work
}







On Wed, May 7, 2014 at 9:40 PM, Piotr <address@hidden> wrote:
I had a similar problem when I was getting the TextSnapshot everytime I wanted to use setSelected() function. It should be taken only once, when you want to use the setSelected function for the very first time. If this won't help provide some code and example and will see what we can do.


2014-05-07 13:35 GMT+02:00 Yen Soon Low <address@hidden>:
I published using the following command:
pdf2swf -F <dir> -f -T 9 -s storeallcharacters

I was able to read the text using:
textSnapshot.getText()

However, to highlight the text using setSelected(), it did not work. 

Any help is appreciated. I am using Flash Builder 4.7 and AIR 4.0. 

---------------
SWFTools-common is a self-managed list. To subscribe/unsubscribe, or amend an existing subscription, please kindly point your favourite web browser at:<http://lists.nongnu.org/mailman/listinfo/swftools-common>



reply via email to

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