0 Replies - 1616 Views - Last Post: 23 April 2007 - 10:30 PM

#1 karunai   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 63
  • Joined: 10-April 06

Problem in Search OPtion for Dynamic Text

Posted 23 April 2007 - 10:30 PM

Hi all

I am create a text box with search option. If i set the dynamic text property html is true the search option is not work properly.
For Example, instead of selecting "the" in the dynamic text it select some other three word.

Dynamic text:

Intance Name : txtIns
var Name :textvar

Input Box for find the text

Var : inputter

Action Script in FindNext Button:

findNext.onRelease = function() {
	stop();
	Selection.setFocus("txtIns");
	var inputterString = new String(inputter);
	var inputLength = inputterString.length;
	textStart = textVar.indexOf(inputter, textEnd);
	if (inputLength>0) {
		textEnd = textStart+inputLength;
	} else {
		textEnd = 0;
	}
	if (textStart>=0) {
		Selection.setSelection(textStart, textEnd);
	} else {
		
		Selection.setSelection(0, 0);
	}
	textEnd = textEnd;
};

This post has been edited by karunai: 23 April 2007 - 10:35 PM


Is This A Good Question/Topic? 0
  • +

Page 1 of 1