Hi,
It seems the text is getting selected properly but it remains selected just
for a fraction of second then it gets unselected. I don't know what I am
doing wrong. Can it be related to frame rate of the loaded swf or may be the
loading swf?

-bhups

On Wed, Apr 1, 2009 at 8:39 AM, Bhupendra Singh
<[email protected]>wrote:

> Hi Matthias,
> >>>how does your text selection code look like?
> I am generating the output swf as version 9 swf as I want to load it a
> MovieClip object. I am using Action Script 3.
> ==========================
> public var _swf:MovieClip;
>
> this._swfLoader = new Loader();
>             var _this = this;
>
> this._swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
> function(t:Event){
>                 _this._loaded = true;
>                 _this._swf = t.target.loader.content; // _swf will contain
> the swf as a movieclip object
>                 _this.addChild(_this._swf);
>                 trace( _this._swf.textSnapshot.charCount); // results in
> correct char count
>                 var match:Number = _this._swf.textSnapshot.findText(0,
> "bhup", false); //returns a valid index in the TextSnapshot
>                 trace("selecting " +
> _this._swf.textSnapshot.getText(0,100)); // prints nothing, I was expecting
> it to print first 100 character from the snapshot
>                 trace( match); //valid searched item's index
>                 if (match != -1) {
>                     //_this._swf.textSnapshot.setSelectColor(0x87C7FF);
> //this doesn't effect the output
>                     _this._swf.textSnapshot.setSelected(match, match + 4,
> true); //it should select and highlight the text, but unforunately nothing
> happens here
>                 }
>     }
> _swfloader.load("file.swf");
> ====================================================
>
> And I am curious, why there is considerable size difference in 0.8.1 swf
> and latest dev snapshot swf. (almost 100 %)
> --
> Best Regards,
> Bhupendra.
>



-- 
Best Regards,
Bhupendra.

Reply via email to