|
|
Search Tutorials
Introduction Need a ticker on your site, but can't scrounge up the $1000 for Generator? This tutorial will show you how to make your own ticker with even better features! Generator tickers suffer from several problems: they can only move at a single pre-determined speed, they cannot change directions, and their file size is HUGE! Since my version is entirely driven by ActionScript, not tweens, the final file size is very small. My example SWF is 7k, of which nearly 5k is font outlines. A text-only ticker with generic fonts could easily weigh in under 4k! First, you have to decide what the general format of each ticker entry should be. This example only uses a single format, but a small change to the data file along with a small addition to the ActionScript could allow for multiple formats. In the example, each entry is simply two stacked text fields:
(Yes, I realize how boring this is.) Thus... to create a ticker, we'll need two data values for each entry, which leads us into the format of the data file. In the file that you can download at the bottom of this tutorial is a file called "list_data.txt". This is read in by the SWF at run-time to create the ticker. Here is the URL encoded data from the file: itemcount=8&symbol1=MSFT&price1=70.5&symbol2=SBUX&price2=34.5625& symbol3=CSCO&price3=62.875&symbol4=AMCC&price4=96.875&symbol5=QCOM&price5=74.6875& symbol6=INTC&price6=128.9375&symbol7=WCOM&price7=43&symbol8=ORCL&price8=82&eof=1
|
||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||
|