Extracting textsnapshot data from dynamiclly created UILoaders for multiple swf files

Hello,

Need some help in adding text search feature.
I’m using tutorial at the link below to load files.

http://www.beautifycode.com/the-finer-art-of-loading-2-handling-multiple-swfs

Loading and all is fine.
I have written code to extract text from the loaded swf.
This code works fine if i load swf in UILoader on stage but does not work with dynamiclly created UILoaders.

Here is the code

.
.
.
//swf loading code…
_swfTempClip = (event.currentTarget);
timeLineRef.textSearcher.AddSearchData(_loadedSWFs, _swfTempClip);

swf’s are loaded as explained in the tutorial. After loading each swf below function is called.
public function AddSearchData(_pageNum:Number, _pageObj:Object):void
{
trace("add Search Data "+_pageNum);
var tempPageObjS:Object = new Object();
tempPageObjS = _pageObj;
var tempMCS:MovieClip = new MovieClip();
var tempSnapTextObjS:TextSnapshot;
var tempStrS:String = new String();
if(tempPageObjS != null && tempPageObjS.toString() == “[object MainTimeline]”)
{
trace(“it is MC1”)
tempMCS = tempPageObjS as MovieClip;
tempSnapTextObjS = tempMCS.textSnapshot;
trace("tempSnapTextObjS "+tempSnapTextObjS.charCount)
//strange thing is i’m getting proper count value for above trace
tempStrS = tempSnapTextObjS.getText(0,tempSnapTextObjS.charCount,true);
//but empty string below trace
trace("tempStrS "+tempStrS);
}
}

Am I missing something here?
Thanks for any help! :slight_smile: