Показать сообщение отдельно
Старый 21.06.2005, 23:13
silin вне форума Посмотреть профиль Посетить домашнюю страницу silin Найти все сообщения от silin
  № 2  
Ответить с цитированием
silin
 
Аватар для silin

блогер
Регистрация: Mar 2003
Адрес: Моск. обл.
Сообщений: 5,269
Записей в блоге: 6
вариант:
Код:
this.createEmptyMovieClip('cntr',0);
var c=this.cntr;
tf.onSetFocus = function(){
  c.onEnterFrame=function(){
	  this.s=Selection.getBeginIndex();
	  this.e=Selection.getEndIndex();
  }
}
tf.onKillFocus=function(){
	trace(this.text.substring(c.s,c.e));
	delete c.onEnterFrame;
}
зы: пардон, невнимательно прочел первый пост: такой вариант упоминался, с онмаусмувом даже складнее:
Код:
Mouse.addListener(tf)
tf.onSetFocus = function(){
  this.onMouseMove=function(){
	  this.s=Selection.getBeginIndex();
	  this.e=Selection.getEndIndex();
  }
}
tf.onKillFocus=function(){
	trace(this.text.substring(this.s,this.e));
	delete this.onMouseMove;
}