Today we're going to make a Bitstream scroller. The Bitstream must contain an endless stream of random generated bits and must scroll downwards. So you'll never know what you gonna get.
First we create a new Flash document. Set the document width and height to 120X90 pixels and set the document Frame rate to 40 fps.
Use the Text Tool to create a textbox on the stage and type some dummy zeros for the text. This textbox is going to contain our random generated bits.
Go to the properties window and set Fontstyle to Courier New, 12, Bold, Align Center. Use the square in the right bottom of the textbox to set the width to 120.0. Use the properties window to set the height to 18.0, make sure you set the aspect ratio off, do this by clicking on the lock on the left otherwise the width will change too and we don't want this to happen. Set X to 0.0 and Y to 72.0 so the text will be on the bottom of the document.
Make sure your text is of the type Dynamic Text(left top of the properties window) and set the Var property to _root.BitLine9. Dynamic text means we can change this text at run time, using the variable _root.BitLine9. For every line of bits we are going to create a text with a variable. This variable is going to contain the actual bits that are scrolling down.
Copy the text 9 times and paste each copy exact on top of the previous copy. Use the guide lines in Flash to do this. So the last copy of our text should have a X of 0.0 and a Y of -90.0. Make sure it has exactly these values and not -90.3 or something like that.
For each text we created we are going to set a different Var variable. Make sure you use the capital letters because Flash is case sensetive. For the text on top set Var to _root.BitLine0,
for the second text set Var to _root.BitLine1,
for the third text set Var to _root.BitLine2,
and so on...
For the ninth text set Var to _root.BitLine8, and the original text we already set to _root.BitLine9.
If you performed all above actions your Flash document should look something like this now:
|» Level Intermediate|
Rating: 6 Votes: 7
|Not much to tell ya!|
|Download the files used in this tutorial.|
|Download (172 kb)|
|More help? Search our boards for quick answers!|