-
Flash Dynamic Text Problem
I am having a problem with the dynamic text on a site I am designing.
I am not a proficient Action Script coder, so this may be a simple solution.
The text is meant to look as though it is typewritten, with each letter appearing separately. This part works fine. The text box should then disappear, however, and I can’t get that to work. Any ideas on how to do this? I tried using motion tweens and adjusting the alpha via the timeline, but I had horrible results and all I had was flickering text. I think I just need a little bit more Action Script code.
I am using AS3.
Here is the code:
var str:String = ‘”jennifer brings exactly the kind of personal warmth and professionalism that is ideal for that special day.” -cynthia bartley, mother of the bride’;
var i:uint = 0;
var timer:Timer = new Timer(40);
timer.start();
timer.addEventListener(TimerEvent.TIMER,gotime);
function gotime(e:TimerEvent) {
textbox_txt.appendText(str.charAt(i));
i++;
if(i>=str.length) {
timer.stop()}
}
Any help is greatly appreciated. Thanks.