0

Multiline htmlText scrolls on drag selection of text

It also scroll on mouse wheel event..

var css:StyleSheet = new StyleSheet();
css.parseCSS('.red-text{font-family:"Lucida Grande";color:#ED1C24;font-size:10;font weight:bold;leading:-8;}');                 

dynamicText.styleSheet = css;
dynamicText.antiAliasType = AntiAliasType.ADVANCED;
dynamicText.embedFonts = true;
dynamicText.multiline = true;
dynamicText.wordWrap = true;
dynamicText.htmlText = "<p class= 'red-text'>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor consequat. </p>";

dynamicText.width = 450;
dynamicText.height = dynamicText.textHeight;

any fixes??

Nilesh Ukey
  • 5,488
  • 3
  • 20
  • 22

2 Answers2

2
field.addEventListener(Event.SCROLL, _scroll);
function _scroll(e:Event):void
{
    e.target.scrollV = 0;
}
Marty
  • 39,033
  • 19
  • 93
  • 162
1

You can disable the scroll wheel with dynamicText.mouseWheelEnabled = false. Also you should set dynamicText.height = dynamicText.textHeight + 4; because the text field has a padding of 2 pixel around the text (see docs)

DanielB
  • 19,910
  • 2
  • 44
  • 50