Flash tutorials
Home 3D (2) Actionscripting (66) Animation (108) Audio (4) Drawing (7) Full flash sites (4) Getting Started (15) Navigation (25) Special Effects (61) Text Effects (38)

Random text presentation using the AS

5.1.2010, 21:5    Total views: 29757

Read this thoroughly explained, detailed flash lesson and see how to create random text presentation using the action script code. You can use this presentation for some web site as flash banner or for some other animation. Using this lesson, you will also learn how to import any photo into a flash stage, how to type any text, convert it into a movie clip symbol, create instane name and much more! Let's start!

Example



Step 1

First, save the photo of Taylor Swift below that we will use for this lesson.





Step 2


Create a new flash document. Press Ctrl+J key on the keyboard (Document Properties) and set the dimensions of your document as the dimensions of photo (400x441 px). Select any color as background color. Set your Flash movie's frame rate to 10 and click ok.

Step 3

Call the current layer photo. Double-click on its default name (Layer 1) to change it. Press Enter once you have typed in the new name!

Step 4

Choose now File > Import > Import to stage (Ctrl+R) and import a photo that you just saved in step 1 into a flash stage. While the photo is still selected, go to the Align Panel (Ctrl+K) and do the following:

1. Make sure that the Align/Distribute to Stage button is turned on,
2. Click on the Align horizontal center button and
3. Click the Align vertical center button.



Step 5

Create a new layer above the layer photo and name it text.

Step 6

Select the text layer and take the Text tool (T). Then, go to the Properties Panel (Ctrl+F3) below the stage, and select the following options:

a) Select a Static Text field.
b) Select a Zurich Blk BT font.
c) Choose 14 as font size.
d) Select #310654 as color.
e) As the rendering option, select Anti - alias for readability.



While the text is still selected, hit F8 key (Convert to Symbol) to convert it into a movie clip symbol.



Step 7

While the new made Movie Clip (text) is still selected, go to the Action Script Panel (F9) below the stage and enter the following action script code inside the actions panel:

onClipEvent(enterFrame)
{
_alpha=random(140);
_x=_x=random(400);
_y=_y=random(441);
}

Step 8


Select the text and hit Ctrl+D key (duplicate) to duplicate it few times. After that, place it on the stage on the random position. See the picture below!



We're done!

Test your movie and enjoy!

Source

Have questions about this tutorial?
Visit our friendly Community Forums!
Digg it! Add this tutorial to del.icio.us! Furl it! Add this tutorial to reddit! Spurl it! Add this tutorial to technorati!

Top tutorials

1. Advanced full flash site - Part 1
Total views: 310911

2. High-tech city animation
Total views: 274119

3. Water effect
Total views: 237426

4. Photo slide show
Total views: 221072

5. Special Picture Effect
Total views: 190869



Related links

dans le cadre de leur collection automne / hiver 2008 de la ngc, marque japonaise a ainsi une fois de plus a porter.ADIDAS TUBULAR WOMENils ont travaillé sur l'ensemble des trois pieces et # 8211; un sac fourre - tout, une valise et un porte - clés / carte de voyage.ils présentent une gamme de produits classiques.le fait qu'elles offrent a la plupart d'entre eux en orange est un bon contraste.  via honeyee.ADIDAS ORIGINALS NMDon peut s'attendre a une libération de ce produit dans les semaines a venir.ADIDAS TUBULAR SCHUHEla broderie artiste kimberly scola est parmi ceux qui participent a ce los angeles & # 8216; & # 8220; cette fete et # 8221; exposition,ADIDAS YEEZY BOOST 550 inaugurée vendredi dernier.ADIDAS EQUIPMENT 10a l'occasion de l'ouverture, en cas de scola a collaboré avec une tapisserie de 100 faux sacs fourre - tout.Adidas Adizero F50 FGces agréables rappels d'un événement,ADIDAS X PLR malheureusement, seulement deux jours de liaison.ADIDAS MESSI 16.3 ICles points saillants de & # 8220;StartAdidas Ultra Boost Uncaged cette fete et # 8221; et une liste de cas suivent l'artiste.ADIDAS ACE 16.3 TF