text ticker

Scrolling in Flash

Monday, April 5th, 2010

I have been getting a lot of questions for a good way of scrolling in Flash. So I thought I would let you know about the Scroll Flash Tutorial I made on how to do that. It gives you the code and the explains  basic functionality.  But if you don’t know anything about programming, I also created a simple Auto Scroll Flash file or in other words a Flash Text Ticker / Text Scroller file.  It’s completely customizable by XML so you don’t even have to know Flash to use it and it super easy to add to any website. You can change the font size, color, link color, background color, and add multiple lines of text if you want, and you can even setup a timer to display each text line item. If you buy it, there is also a help file that will give you a step by step process on how to edit the XML file and add the Flash scroller to your webpage.  To see a few examples of this file in action, click the example  image below.

If you guys have any more specific questions about scrolling in Flash,  just let me know by sending me an email through my contact page or leaving a comment.

Cya

Flash Text Ticker / Scrolling Text in AS3 Revisited

Friday, January 29th, 2010

After looking at my google analytics for some time, I noticed I get  a lot of hits from this post:  “Flash Text Ticker / Scrolling Text in Actionscript 3.0“.   Its a basic tutorial on how to create scrolling text in Flash. I wanted to revisit that component and make it better, and integrate it with a XML file so users can easily edit things. I have finally finished working on it and it got approved for sale on activeden. Its called Flash Text Ticker / Scrolling Text Actionscript 3 and here are some of its features, and you click the image below to view the fullscreen preview:

  • Fully Customizable by XML
  • Easily change the width and height, and a special javascript function handles the resizing in the browser
  • No need to even open the flash file
  • 3 Different direction types to choose from
  • Easily change the scrolling speed, delay time, and duration
  • Easily change the font size, font color, font type, and link color
  • Handles most html tags for even easier customization
  • Add as many items as you want (Displaying one at a time)

Cya

Flash Text Ticker / Scrolling Text in Actionscript 3.0

Wednesday, July 29th, 2009

Update: I have created a text ticker / scrolling text component based off of this tutorial that is integrated with a XML file so users have more options and can make easy changes.  Click the image below to learn more.

So I have been working on a mp3player that is designed similar to a ipod with a little bit different functionality. I needed the text fields to scroll back and forth so you could see all the text written inside of it, if the field was shorter than the width of the text. After looking around for a tutorial or another persons help and not finding a thing for Actionscript 3, I decided to write my own. I am using Tweenlite to handle the tweens because its really low on weight and its a very smooth and powerful tweening engine. I am almost done with the mp3player and I will show you that very soon, but I wanted to post an example of the scrolling text or flash ticker (as some people call them) to you first before then. The example and code is below. I use one movieclip with an instance name of item that has two items inside of it, a dynamic textfield holding the text and a mask to only show the part I want shown.

scrollingText

//import libraries
import flash.utils.*;
import flash.text.TextField;
import gs.*;
import gs.easing.*
 
//make the text too long for the textfield and assign the mask for it
item.menuItemText.text = "This text is too long to fit in this tiny textfield, here is the end";
item.menuItemText.mask = item.menuItemMask;
 
//call the scrollWords function
scrollWords();
 
//the scrollWords function
function scrollWords():void {
        //make the textfield wordwrap false and autosize to textFieldAutoSize.LEFT
	item.menuItemText.wordWrap = false;
	item.menuItemText.autoSize = TextFieldAutoSize.LEFT;
 
        //if the textwidth is longer than the masks width which is 173 then call goforwardtween
	if(item.menuItemText.textWidth > 173) {
		goForwardTween(item.menuItemText);
	}
}
 
//go forward tween, on complete it calls go back tween
function goForwardTween(tf:TextField):void {
	TweenLite.to(tf, 3, {x:-(item.menuItemText.textWidth) + 163, delay:1, onComplete:goBackTween, onCompleteParams:[tf] });
}
 
//go back tween, on complete it calls go forward tween
function goBackTween(tf:TextField):void {
	TweenLite.to(tf, 3, {x:10, delay:1, onComplete:goForwardTween, onCompleteParams:[tf] });
}

Cya