PDA

View Full Version : Text won't wrap in Ticker Component


Jiffy Loop
02-19-2003, 10:39 PM
Hello,

I've been messing around with the Flash ticker component and for some reason I can't get the text to wrap. I'm using it for a news ticker and some of the headlines are longer than the width of the ticker. Is there some way or method to set the text to wrap?? Or is this a known bug??

Thanks,

Jiffy Loop

freddycodes
02-19-2003, 11:00 PM
You could try something like this.


myTicker.setDataAllProperty("multiline", true);
myTicker.setDataAllProperty("wordWrap", true);
myTicker.setDataAllProperty("autosize", "center");


where myTicker is the instance name of your ticker.

Jiffy Loop
02-20-2003, 02:37 AM
Thanks Freddycodes!!

It worked like a charm!!

You're true to your name!!

Jiffy

shotokan
03-26-2003, 04:26 AM
Im a newb with actionscript I was having the same problem with the ticker and someone reffered me to this thread. Where exactly would I need to insert those lines of code?

starbellie
04-01-2003, 01:53 AM
i was hoping it would be this easy. i tried putting the code in various spots to no avail. could somebody give me some hinters to make the text wrap? also need to be able to use html or at least make the entire entry a link. thanks :)

CyanBlue
04-01-2003, 05:41 AM
This is what I did... (I never used this Ticker component before, so what I am doing here might not be the best way of doin it...)

Drag the Ticker componet into the stage...
Give an instance name of 'myTicker' for it...
Add this script to the frame one...var theData = new Array();
theData[0] = {text:"Data 1 is blah blah", textColor:0xFF0000, border:true};
theData[1] = {text:"Data 2 is so so so so so so", underline:true, bullet:true};
theData[2] = {text:"http://www.ActionScript.org", underline:true, textColor:0x0000FF, border:true};
myTicker.setDataProvider(theData);
myTicker.setDataAllProperty("multiline", true);
myTicker.setDataAllProperty("wordWrap", true);
myTicker.setDataAllProperty("autosize", "center");
myTicker.setSpacing(25);
myTicker.setClickHandler("myClickHandler")
myClickHandler = function(ticker, index)
{
if (ticker.getItemAt(index).text.substr(0, 7) == "http://")
{
getURL(ticker.getItemAt(index).text);
}
}This worked for me... ;)

Rossman
02-26-2005, 06:32 PM
Hey Cyan,

I was wondering, how did you find out how to build your array such that the ticker would understand it? I just downloaded the UI Components Set 2 today and am having trouble finding any help or documentation for it.

Thanks,
mark ;)

CyanBlue
02-26-2005, 06:54 PM
Um... You don't really want me to remember what I did almost two years ago, right??? :D

I don't know what your exact question is, but if it is FMX component you are talking, you've got to navigate through the souce of the component from the library and see how things are working... :)

Rossman
02-26-2005, 06:59 PM
Haha, I didn't notice the post date ;)

Anyways, I found the source file (FlashUIComponents2.fla or something) but when I double click it, nothing comes up in Flash! I'll keep searching, thanks!

Cheers,
mark

CyanBlue
02-26-2005, 07:10 PM
As I was saying, check it out from the library if you are working on FMX...

Drag the ticker component onto the stage... Delete it... Open up the library and start fiddling with what's in the library... :)

Rossman
02-26-2005, 07:14 PM
Ah ok, I see there is code tucked away all through there.

As always you're a great help!

Thanks,
mark ;)

TheSheriff
11-02-2005, 07:08 PM
CyanBlue,

do you have any other setDataAllProperty values that I can use to adjust myTicker. I am trying to use this component for a horizontal ticker and am having a few issues

- I assume the text fields for the data are too short as my array values are being cut off (how do I set them to adjust)

- I have no control over the size of text or font

any other suggestions would be a huge help. Thanks in advance

CyanBlue
11-02-2005, 08:35 PM
Howdy... :)

Can you post the sample file??? What version of Flash are you using???

rahma
01-09-2006, 03:18 PM
Hi All

I am using Flash ticker component and followed the procedure which is mentioned in the posts, but still the text is not wrapping. Can anyone help me to solve this problem.

I am using the Flash 8, I dragged the ticker component and exactly pasted the code from the post.

Thanks in Advance
Regards
Raja

CyanBlue
01-09-2006, 03:56 PM
Howdy and Welcome, rahma... :)

I am not sure if the process will work with the F8 component... Your best bet is to post the question to this forum...
http://www.actionscript.org/forums/forumdisplay.php3?f=36