The very simple trick to do that. Place the label at the bottom of the
Canvas and take the label text in string. Here is the source code:
?xml version=1.0 encoding=utf-8?
mx:WindowedApplication xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute creationComplete=(scrollTextHorizontaly())
mx:Script
![CDATA[
private var timerObject:Timer;
[Bindable]
private var scrollText:String = Welcome to My World. Come here
for any query and solution... ;
private function scrollTextHorizontaly():void
{
scrollText = lblText.text;
timerObject = new Timer(500);
timerObject.addEventListener(TimerEvent.TIMER,dotheScrolling);
timerObject.start();
}
private function dotheScrolling(event:TimerEvent):void
{
var tempString:String;
tempString = scrollText.substr(1,scrollText.length);
scrollText = tempString + scrollText.charAt(0);
}
]]
/mx:Script
mx:Label id=lblText bottom=5 text={scrollText} fontWeight=bold
fontSize=12 textAlign=center /
/mx:WindowedApplication
Best,
Ashish
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Vivian Richard
Sent: Wednesday, June 17, 2009 11:54 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Flying text or passing text??
Where can I view those examples? I have used move effect for canvas
and panel. The way I used it was - I made the x or y coordinate of the
moving element to some thing so that it is not visible at all and once
some event is triggered I just move it in using move effect.
Are you suggesting that same thing for this text effect?
On Wed, Jun 17, 2009 at 12:29 AM, Tracy Spratttr...@nts3rd.com
mailto:tracy%40nts3rd.com wrote:
One way to do this is to use a canvas of fixed width and inside that have
a
lable that is the length of the text, and use a Move effect to move the
label over the canvas.
There are examples available.
Tracy Spratt,
Lariat Services, development services available
From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ]
On
Behalf Of hworke
Sent: Wednesday, June 17, 2009 1:04 AM
To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
Subject: [flexcoders] Flying text or passing text??
Hi, I am trying to create an effect using
text. I do not know what to call it - flying
text or passing text!! At the bottom of
the TV screen we always see Headline news
or stock market info text are moving from
right to left - I want to do something like
that. What is the best option for me?
Regards..