Flex Autoscrolling textComponent

Hello All,

I am working on autoscrolling of text . when the application is loaded the component gets the data from xml file using http service.
i need to make the text which is displayed in the autoscrolling component as multiline.
Right now i did not given any width for the autoscroll component. when i mention width property i am unable to see the complete text.i need to make this text to multiline or wordwrap when i fix the width property .

how to achive this .
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You attached ScrollingData twice, rather than the 2nd attachement being your scrollingText component.

On the assumption that your scrollingText component extends Text, you should know that Text class extends the Label class which supports single line text only.

Ii suggest you look at using the mx.core.UIFieldText class that supports mulit-line text and scrolling

I had a similiar issue where I was trying to add mulitline text to Checkbox labels, obviously the label only supports sinlge line text...attached is the custom class I wrote to get around the issue....it might help

Alternatively update the code samples you attached so I can have a look at the ScrollingText component.
package com.common.controls
	import mx.controls.CheckBox;
	import mx.core.UITextField;
	import flash.text.TextFieldAutoSize;

	import flash.display.DisplayObject;
	public class ANZMultilineCheckbox extends CheckBox
		public function ANZMultilineCheckbox()

		override protected function createChildren():void{
			// Create a UITextField to display the label.
			if (!textField)	{
				textField = new UITextField();
				textField.styleName = this;
			textField.multiline = true;
			textField.wordWrap = true;
			textField.autoSize = TextFieldAutoSize.LEFT;
		override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
			super.updateDisplayList(unscaledWidth, unscaledHeight);
			textField.width = 795;
		override public function get measuredWidth():Number {
	        return textField.width + 10;

Open in new window

srujanmiryalaAuthor Commented:
Attached Scrolling text Component
yeah as I suspected you are using the mx.control.Text class, which extends Label class. Labels do not support multi-line text.

have a look at the code in my last comment, I'm sure the UITextField class will help you achieve what you want.

Give it a go and let me know if you need further assistance

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

srujanmiryalaAuthor Commented:
I will do that and let you know the result
srujanmiryalaAuthor Commented:
Hey man8473,

Thanks for the help.
Now i am using UITextField in  place of Text. it is working fine.
awesome, glad I could help....
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.