* Google News *

Tuesday, September 8, 2009

MySpace Release E-mail Service

NEW-NEW is a social networking site MySpace (MySpace.com) announced the e-mail service that will berakhiran@myspace.com latest. Although still in beta, MySpace believes the e-mail services they would be the e-mail service second largest in the U.S. and fourth in the world. The uniqueness of this service is the user can insert an image from an online profile to the e-mails and attachments can megirim video and music clips.

Lapan Online Library

INSTITUTION Aviation and Space Agency (Lapan) inaugurated an online library services and community space Indonesia lover. With these services, the public can access the collection database 5000 textbook, journals, and research results from the library Lapan. The library address at perpustakaan.lapan.go.id. While lovers community mailing list in the group space
komunitas-antariksa@yahoogroup.com

Primp by Theme

AFTER a long race with competitors in terms of features and technology, Google seems to have 'tired'. Company founded Larry Page and Sergey Brin had made 29 theme to beautify their besutan browser, Chrome. As a result, the browser display a more attractive and can make activities more fun surf. You can try out new designs on the link Chrome
http://tools.google.com/chrome/intl/en/themes/index.html

Cartoon Animation

Cartoon Animation

Flash is one of those wonderful programs that can be put for a plethora of uses. But one of the most common things people want to be able to do with it is make cartoons and animations. There's a lot of ways to do this, but I'm going to show you a very simple, scripting free way of bringing some characters to life.

[ you'll be making something similar to what is shown above ]

Steps to Create Animation
Before we begin our animation, we need a character. This little guy below is one that I quickly drew using a similar process to that described in another tutorial, Line Art In Flash. He looks a little bit lost, bless him. Let's call him Dexter.

[first draft of character]

At the moment, Dexter is just a collection of lines and fills, and not much good for animating. What we need to do is break up the character into his component parts (ouch!), and save them all as Library items.

Of course, the easiest way to do this is to simply draw each body part on a different layer as you go. That way, you can see how the fit together in relation to each other, get the sizes right etc etc. But if you've already drawn the character, then you'll just have to get your mouse dirty, get in there and pull poor Dexter to pieces. Select the lines and fills that make up a body part (say the head) then cut and paste into a new symbol. In a lot of case, you may find that a piece isn't complete, where it intersected with other areas. If that happens, then you just add some more lines and complete the part.

[individual symbols]

You can see from the picture above that Dexter is now split up into sections. Notice that although we only had one original eye image, I've duplicated the symbol and made three more versions, each with the lids closing. We need this to make him blink. I've also made a short movie clip for the mouth, containing a couple of lines / states for a talking mouth. A little tip for arms - make sure that the registration point is located at the 'shoulder' joint of the image. This makes it easier when you come to rotate them.

Make sure you have all your symbols saved in the library, and a clear Stage. Now, we can begin to create a small animation.

  1. Make a new movie clip symbol, and call it M Eyes Blink. Inside it, place your open eyes in frame 1. Insert another keyframe at around frame 40 or so. In this one, replace the open eyes with the next level down eye image, where the lids are starting to close. Put another keyframe in the next frame, and repeat the process, inserting the almost closed eyes. Put the fully closed eyes in the next keyframe. Then insert another three frames and reverse the process. No need to put any scripting on the end, we want this to loop continuously, so Dexter will blink every few seconds.

    [your eyes go in this order]

  2. Create a new movie clip. We're going to use this one for our character, so give it a couple of layers. Call each one something meaningful, like R Arm, L Arm, Legs, Head etc. Remember that some body parts will need to be behind others. In the case of Dexter, one of his arms is partially behind his body, so I have to make sure that the layer containing his left arm is behind the layer containing his T-Shirt.

    [layer structure]

  3. It may also be worth making a new clip for the characters' head, although this depends on how complex you want the animation to be. For the more detailed movies where you're trying to sync voice files and mouth movements, it's probably not worth doing, and you'll find it better making individual movies for each line. In this case though we just want to see an example, so we'll combine the head, eye animation and mouth animation into one, and place it on the top layer of our character movie.
  4. But that's not enough! How about we get him to look at his watch every now and then? That's just a simple motion tween of our arm and head symbols. Go into the character movie clip, and F5 up to around frame 43 on each layer.
  1. On about frame 15 of the R Arm layer, make a keyframe. A few frames later (depending on how long you want the action to take, make another. In this second one, rotate the arm (this is where you need the registration point on the shoulder axis, it makes it a lot easier) to the point you would like it to be. You may find that the arm overlaps part of the body image. In that case, edit the arm symbol so this doesn't happen. When you've chosen your finish position, select a frame in between these two states, and apply a motion tween. Give him a few frames to look at his watch, the reverse the process, moving the arm back to its original position. Do something similar with the head, so that he actually looks down at his watch.

    [animation timeline]

  2. Now run your movie, and you'll see him getting the time every few seconds, still chatting and blinking as he does so.

And that's the basic principle. It's very handy to make a small collection of body parts (not literally, I do mean Flash images here) in your library. Draw various positions of arms, so you'll always have the one you need on hand. Different expressions can be made by using different mouths and eyes, so have a good selection of these too.

Certain motions (like the watch checking) can be put into small clips, then re-used as and when you need them, so you can build up a collection of mini movie actions too.

Add more characters, backgrounds, anything you like. Here's the .fla file for the basic movie (including a selection of other characters for you to break up) ready for you to animate and warp to your hearts' desire.

download fla

Creating a Sound Bar

Creating a Sound Bar

Now a-days, clients and visitors are looking for more in a Flash website. One way to add an entire new dimension to your website is to add sound. This tutorial will show you how to build a one song sound controller for your website.

For an example of what you will be creating, press the Play button in the animation below:

sound example

[ press 'play' ]

Supplied in this tutorial are a sound clip, various ActionScript, and two finished FLA files. Since cutting and pasting ActionScript does not aid much in the learning process, an explanation of the ActionScript is provided at the end. For more detailed explanations, please refer to the KirupaForum, and/or your ActionScript Dictionary (in Flash: Help > ActionScript Dictionary)

Steps to Create Animation
The following steps will guide you in creating the above sound animation:

  1. First of all, you will need a sound loop to play. While generally it’s better to use a longer loop (say fifteen to thirty seconds), I have included a very short audio clip for you to play with.

    Download it and unzip it. Please keep in mind that I didn’t make this clip, it came free with FruityLoops: Download Sound Loop Here.

  2. Now that you have your audio file, fire up Flash. Create a new document (File > New) and change the dimensions of the movie to 700 pixels (width) by 15 pixels (height). You can modify the movie by pointing to Modify > Document.

  3. We will begin by creating the play button. In the main timeline, name the current layer “buttons” (without quotes). On the stage, create some text. Type something descriptive like “Play” (without quotes) in the textbox.

  4. Make sure the text type is Static Text. Select the text and make it into a button (F8 or Insert > Convert to Symbol…). Modify the button for your desired aspects.

  5. In the main timeline, create a new layer. Name the layer “Actions” (without quotes). Click the first frame of this layer and bring up the Actions panel. Copy the following code in (code will be explained at the end of the tutorial):

stop();

  1. Save the document (File > Save) as “sound” (without quotes).

  2. Now click on the button we made back in step c. Bring up the Actions panel again (right-click on the button and select Actions), and copy the following code:


  1. Replace [absolute location of movie] with the path of the directory where you saved the movie.

    1. Example: C:/Program Files/Macromedia/Flash MX/kirupa

    2. Example: http://www.yourwebsite.com/flash

  2. Save the document again, and publish it.

  3. We will now begin creating the playing sound and the stop button. With sound.fla still open, point to File > Save As…, and re-save the movie as “sound1” (without quotes).

  4. After you have re-saved your movie (see above step), change the descriptive button on the stage to something like “Stop” (again without quotes). Add the following ActionScript to the button


  1. Excellent, we’re almost done. Create a new layer below the Actions one. Name this new layer “loading” or something of this sort. Throw some text up there and a small animation to indicate that your movie is loading. Don’t make it too complex; you want this to load as soon as possible.

  2. Select the second frame of the loading layer, and press F5 (or point to Insert > Frame). Find the fourth frame of the buttons layer and again press F5 or point to Insert > Frame.

  3. Try to stick with me here, it’s not that confusing. In the Actions layer, select the first frame. Bring up the actions panel. Copy and paste the following code:


  1. Ok, now select the second frame of the Actions layer. In the actions panel, paste this code:

gotoAndPlay(1);

  1. Lastly, select the fourth frame of the Actions layer. This frame’s action should be a single stop() command:


  1. Close the action panel and point to File > Import... Find the audio file you downloaded and unzipped earlier. Import it. Select the third frame of the Actions layer, and in the properties window find the sound dropdown box. In this box select the sound file you just imported. Set the loop to 9999. You may also want to add a fade in for grins.

Code Explanation
The following section explains the reasons behind the code added:


  • stop()
    Stops the movie’s play head

  • on (release) {
    Calls the following action when a button is released

  • loadMovie("[absolute location of movie]/sound1.swf", this);
    Loads an external swf file into the current one.
  • }
    Closes the action that will execute when the button is released

  • totalb = _root.getBytesTotal();
    Declares the variable “totalb” and assigns it the value of the total size, in bytes, of the movie clip

  • loadedb = _root.getBytesLoaded();
    Declares the variable “loadedb” and assigns it the value of the number of bytes loaded so far

  • if (loadedb == totalb) {
    If statement, saying that if the two values of “loadedb” and “totalb” are the same, the enclosed action is to be executed
  • _root.gotoAndPlay(3);
    The action to be executed if the if statement returns true

  • gotoAndPlay(1);
    Tells the timeline’s play head to return back to, and play from, the first frame

Also, I have provided the final FLA files for your perusal:

download zip

Creating a Volume Control Slider

Creating a Volume Control Slider

While a simple sound 'on' or sound 'off' button is acceptable, a volume slider is even better! A volume slider is a small bar that you can drag to increase or decrease the volume of any sound. In this tutorial, you will learn how to create just that.

The following animation is a good example of what you will be creating. Drag the horizontal slider to the right and press the Play arrow to hear the sound. Notice how the volume increases when you slide the slider to the right and decreases when you slide the slider to the left.

[ once the music loads, increase the volume and press the play arrow ]

Creating the Animation:

  1. A large portion of this animation lies in simply creating the slider. Ilyas Usal (ilyaslamasse/pom) wrote an excellent tutorial that tells how to create a slider: http://www.kirupa.com/developer/mx/slider.htm

    Needless to say, I don't want you to create a slider from scratch for this tutorial. Therefore, I have provided a sample FLA file that includes the above interface with a functioning slider so you can focus more on volume control and not worry about actually having to create a slider.

    Download and extract the partial, zipped FLA and MP3 from the following link:
    Download FLA and MP3 File

  2. Once you have opened the volume_user.fla file you downloaded from the above link, you will see a similar interface as that shown in the example animation above.
  3. First, we need a variable that controls the volume according to the slider's position on the horizontal line. Right click on the slider and select 'Edit in Place'.
  4. You should now find yourself in the slider movie clip. Right click on the solitary keyframe in the Code layer and select Actions.
  5. You will see a chunk of code that enables the slider to work. We need to place a variable that communicates the value of the slider to the rest of the animation. Add the following line of code AFTER the line starting with the word ratio:

_root.volume = ratio;

The entire section of code will now look like this with the code you added colored in blue:

this.ratio = 0;
dragger.onPress = function() {
this.startDrag(true, 0, 0, line._width, 0);
this.onEnterFrame = function() {
ratio = Math.round(this._x*100/line._width);
_root.volume = ratio;
};
};
dragger.onRelease = dragger.onreleaseOutside=stopDrag;

  1. After you have added that line of code, press the blue left arrow under your timeline to go back to the main stage:

[ press the blue arrow to go to the main timeline ]

  1. Now that you are back in the main timeline, you will add the code that makes the sound's volume correspond to the slider.
  2. Right click on the slider and select Actions. You will already see a large portion of code responsible for playing the sound. Before the very last bracket ' }' in the code, add the following line:

mySound.setVolume(_root.volume);

The last few lines of code in your Actions window should look similar to the following image:

[ copy and paste the line of code directly above the last bracket ]

  1. You are done with the animation, but if you are not familiar with what was done in this tutorial, I strongly urge you to read the explanation.

ActionScript Explained
First, let us discuss how the sound gets played and the volume adjusted. The following section of code can be found on the slider movie clip:

onClipEvent (load) {
mySound = new Sound();
mySound.loadSound("sound2.mp3", false);

}
onClipEvent (enterFrame) {
downloaded = mySound.getBytesLoaded();
total = mySound.getBytesTotal();
if (downloaded != total) {
_root.dl = "downloading song...";
} else {
complete = 1;
_root.dl = "";
}

mySound.setVolume(_root.volume);
}

The orange colored code creates our sound object. In this tutorial, I am calling the sound object mySound. For information on dynamically loading a sound file, scroll to the bottom of the page from the following URL: http://www.kirupa.com/developer/mx/loading.htm

In the green section of code, the actual song is preloaded before being displayed. The total size of the sound file is determined using getBytesTotal(). The portion of the sound that has currently loaded is determined using getBytesLoaded().

By using an if statement, we can tell Flash to check if the portion of the sound file loaded does not equals the total file size of the sound file. If the song is still downloading, the if statement will tell a textbox 'dl' to display the text "downloading song...". If the song has loaded, a variable called complete is initialized to 1. You will see where this variable is used again.

In the blue portion of the code, setVolume() is used for the mySound sound object. The variable _root.volume carries a number between 0 and 100 as determined by the slider position (remember we set _root.volume = ratio inside the slider). When you combine all of the above you get the ability to control the volume of the sound.


Now, right click on the Play button on the stage and select Actions. The code you will see is:

on (release) {
if (_root.mySlider.complete == 1) {
_root.mySlider.mySound.start(0, 99);
}
}

The above code actually allows you to play the sound that was loaded in the slider movie clip. If the variable complete, located on the mySlider (slider) movie clip, equals 1, the song starts to play and loops 99 times before stopping. If you recall, in the preloader I discussed in the previous section, the variable complete was initialized to 1 after the song was loaded. I did not want the user to play the sound without having completely downloaded the song. The only way to ensure that would be to use an if statement that prevents the song from being played unless the value of complete = 1; which it will once the sound is loaded.

download final source for flash mx (mp3 not included)

Vibration Effect

Vibration Effect

In my spare time, I often browse through the threads located in the "best of" forum in the kirupaForum. An interesting effect that I discovered during my random scavenger hunts was a vibration effect posted by suprabeener.

I modified the effect slightly by adding some extra features, and the following animation shows you the result of my modification:

[ the vibration effect ]

Here's How:
This tutorial, as you may presume, will help you to create the vibration effect above. I will also take care to explain the code behind this effect so that you can hopefully create a cooler animation on your own:

  1. Make sure you launch Flash MX if you have not already done so.
  2. Draw a small circle in your drawing area. The circle doesn't have to be anything fancy at this point in time. Here is how my circle looks for this tutorial:

[ draw a small circle ]

  1. Once the circle has been drawn, it is time to make it useful by converting it to a movie clip. Select the circle and press F8 (Modify | Convert to Symbol). The Convert to Symbol dialog box will appear. Select the Movie Clip behavior option and press OK.
  2. Your circle is now a movie clip. Let's add some actions to our newly created movie clip. Right click on the circle and select Actions. Copy and paste the following code:

[ copy and paste the above code ]

  1. Press Ctrl + Enter, and you should be able to see your circle vibrating. If you are interested in learning how to duplicate the circles around your movie, read on. If not, feel free to go to the next section titled "The Code Explained" to learn why the circle vibrated.
  2. Duplicating the movie clip isn't overly complicated. First, we need to give our circle an instance name. Select your circle, and in the Properties panel replace <> replace that with the name circle:

[ give the circle the instance name circle ]

  1. After having given your circle the instance name 'circle', right click on a frame on your timeline and select Actions. Copy and paste the following code:

for (var i = 0; i<25;>

[ copy and paste the above code ]

  1. You have finished the animation. The following section will help

The Code Explained
As mentioned earlier, the following few sections will help you to better understand why the code causes the circle to vibrate, change shape, change location, and change transparency.

Let's start with the major lines code in the onClipEvent(load):

//movie width/height
height = 200;
width = 300;

The above variables represent the height and width of your movie. If your movie's width and height are not 300 pixels wide by 200 pixels tall, you must change the values to represent your movie's dimensions.

//------------------------//
//makes everything random //
//------------------------//

this._x = Math.round(Math.random()*width);
this._y = Math.round(Math.random()*height);
var temp = this._alpha=Math.random()*100;
this._xscale = this._yscale=temp;

The first two lines place your circle movie clip in a random location on your movie. Notice the appeareance of the width and height variables in the first and second lines. Those variables help to keep the randomness of the Math.random() confined to the dimensions of your movie.

In the third line, I declare a variable called temp, and I initialize the temp variable to the value of this._alpha which equals a random number up to 100. Instead of spanning this line over several lines, I found a common value (the variable temp) and combined everything into one line. Nothing too complicated I hope!

In the fourth line, I set the scale of the circle equal to the value of the variable temp declared in the previous line. Since Flash MX does not have (as far as I know) a _scale property, I have to use both the horizontal and vertical scale properties: _xscale and _yscale. Both of those properties are set to the same value of temp so you don't have a skewed circle with a different horizontal/vertical stretch.

//setting initial position
cx = this._x;
cy = this._y;

These lines of code set the initial x and y position of the movie clip. You will see later that these variables act like an anchor that tell the vibration effect where it's source is.

Now, we venture to the chaotic code of onClipEvent(enterframe):

//causes the object to be offset
this._x = cx+(1+Math.random()*5);
this._y = cy+(1+Math.random()*5);

The two lines are largely responsible for creating the vibration effect. The current position of the movie clip is set to its initial position as determined by cx and cy in the load event. With the initial position solidly anchored, the x and y positions are offset by the value of whatever the output of 1+Math.random()*5 is.


I hope this tutorial helped. For your own convenience, I have provided the FLA of this tutorial's example animation seen towards the top.

download final source

Saturday, September 5, 2009

Examples of Animation in Megaman





Context Menus

Context Menus

From the official Macromedia documentation:

The ContextMenu class provides runtime control over the items in the Flash Player context menu, which appears when a user right-clicks (Windows) or Control-clicks (Macintosh) on Flash Player. You can use the methods and properties of the ContextMenu class to add custom menu items, control the display of the built-in context menu items (for example, Zoom In and Print), or create copies of menus.

You can attach a ContextMenu object to a specific button, movie clip, or text field object, or to an entire movie level. You use the menu property of the Button, MovieClip, or TextField classes to do this.

Having read the official Macromedia definition of this cool new feature of Flash MX2004, let’s see how you can use this.

[ right click on the three graphic, text, etc. ]

First, we get rid of (most of) the normal menu items:

var newMenu = new ContextMenu(); //newMenu will be the name of our ContextMenu object
newMenu.hideBuiltInItems(); //this method is the one that hides stuff such as “print”…
/*if you wanted to hide just ceratin items, you’d use newMenu.builtInItems.[propName]=false; where propName can be:
save, zoom, quality,play,loop,rewind,forward, back, and print*/
_root.menu = newMenu; //attached to _root, so valid for the swf in general

If you check out the properties and methods for ContextMenu in the help panel, you’ll see that we got:

  • customItems (an array)

  • hideBuiltInItems (we just used that above..)

And for the menu items themselves, we can use:

  • ContextMenuItem.caption

  • ContextMenuItem.copy

  • ContextMenuItem.enabled

  • ContextMenuItem.onSelect

  • ContextMenuItem. separatorBefore

  • ContextMenuItem.visible

The names being pretty much self-explanatory!


Now, let’s see how we use these features to build our own menu: (all script and a few clips)

  1. Select frame 1 and open the ActionScript panel.

  2. Here, I’m going to run you through just one of the 5 menus you can see in the example fla/swf above. There’s one on _root, one on each clip, one on the button, and you also get new options on selectable textfields and urls as you can see.

// the mail clip:
var mail_cm = new ContextMenu(); //declare new menu object
// create the item, then push into the Item Array of the new menu object:
//name of new item (“Label that gets displayed”, function to execute when clicked) is the idea
var mailItem_cm = new ContextMenuItem("Send Email to Kirupa", mailHandler);
//push the new item into the the menu array
mail_cm.customItems.push(mailItem_cm);
//now define the function you set up above to be called when the item is used (clicked)
function mailHandler(obj, menuItem){
getURL("mailto:kirupa@not_kirupa.com?subject=From the ContextMenu tutorial&body=Hi Kirupa");
}
/*the function can be anything you want, it will have to take these 2 parameters, but then the code to execute is really all up to you, I used (here) a getUrl to open the mail client with a predefined subject and message header; in the swf also a gotoAndPlay/Stop, a regular getURL to open a _blank webpage to the forums, another item linking to Flashkit which is set to disabled, and finally a function to have the bug’s head clip play to another frame, it is really anything you can come up with..!*/
//finally, we need to associate the new menu with a clip (or button, or textfield), and we’re done.
mail_mc.menu = mail_cm;
//do not get confused with the code hint extensions : _cm for contextmenu, _mc for movieclip

That’s it, quite simple, no?

Download Source

Please look at the code in the fla, check the comments, and then get imaginative and make your own menus; if you come up with something cool, let us know!! ;)

Film Grain

Film Grain

A very cool defect I notice on older movies and films is the film grain effect caused by the aging of the actual film reels. While most would consider that to be a flaw, I take the converse of that view and think it is a really nifty effect. After all, one person's perception of a flaw is another person's idea for a Flash MX 2004 tutorial.

The following animation shows the film grain effect (or defect?) applied to a picture from Easter Island:

[ the film grain effect ]

The tutorial isn't too complicated, but it does require one to pay attention to minor details to help make a really convincing film grain effect. Here's how:

  1. Create a new document in Flash MX 2004. Set your movie's width and height to 300 by 200.
  2. For the sake of simplicity, set your movie's background to a dark color such as black or gray as opposed to using a image.
  3. Now, select your Pencil Tool from your toolbox on the left. Below the toolbox, you will notice a small section marked Options. Click that and select Ink:

[ select the Ink option for the Pencil Tool]

  1. Once you have selected the Pencil Tool and set its options to Ink, take a gander at your Properties panel and make sure the Stroke color is a pale gray color.
  2. With all of the above done, using your mouse, draw small, random dots and dashes in your drawing area:

[ random dots and dashes ]

  1. Now, select all of the dots you made and press F8. The Convert to Symbol dialog box will appear. Select Movie Clip and press OK (the symbol name doesn't really matter).
  2. Right click on your dots - now a giant movie clip - and select Edit in Place. You should now be in your movie clip's timeline. Now, insert a new keyframe on Frame 2 by right clicking on Frame 2 in your timeline and selecting "Insert Keyframe."
  3. Make sure your timeline slider is over the Frame 2 keyframe. Now, move the dots and dashes around a little bit to create the illusion of movement. After you have moved your dots and dashes around quite a bit, right click on Frame 3 and select "Insert Keyframe."
  4. In Frame 3, shuffle the dots and dashes around a little bit. You can also delete all of your dots and dashes and draw new ones to make it truly random. Keep adding keyframes and moving the dots and dashes around. About 9 or 10 keyframes' worth of random movements should be good.
  5. Save your file and preview it in a browser. The film grains you drew should appear and continue looping once they reach their end.

Drawing the Vertical Lines
Foreseeing questions about the topic of the vertical lines, I will briefly mention the tricks behind the moving vertical lines that occur randomly. What I did was create another movie clip and draw a thin, vertical white line. Once the line was drawn, I simply created a motion tween where the line changed position.

I created about 5 or 6 sequences of motion tweens where the line was oscillated around the screen in an erratic fashion. I inserted blank keyframes between the motion sequences to create a slight blinking effect:

[ my timeline: notice the blank keyframes between the tween sequences ]

You can copy and paste the frames in random sequences throughout your movie clip. For more info, take a look at my FLA provided below.

Well that's all there is to this effect. Adding an actual image would make the effect stand out even more. If file size is no concern, you may even want to incorporate actual video files.

I have provided the source files for your use:

download fla

Masking Dynamic Text and Device Fonts

Masking Dynamic Text and Device Fonts

Why can't I mask dynamic text or device fonts yell's the inspiring flash developer!
It makes no sense! I can mask static text, why not dynamic text or device fonts?
Well Macromedia has a somewhat of an explanation here, but I'm going to try and explain this the best I can.

Basically you can only mask device fonts by using an actual movie clip as a mask.
You must also embed your dynamic text into a movie as well. You might not be used to this method as it's so convenient to use the timeline mask and most of the work you probably did in the past never required masking dynamic data loaded into a text field or text area. It's becoming so easy to generate external data in flash.

Here is an example of what we will create. A simple dynamic textarea with some text inside it with a mask applied to it:

[ an example of what you will create ]

Here is How
The following steps will explain what this tutorial will be trying to explain.

  1. Create a new flash document.

  2. Create a new layer and call it textarea.

  3. Draw a text area where you're dynamic text will be stored with your text tool.

[grab your text tool, click on the stage and draw your textarea]

  1. When your finished drawing the text area, open your properties panel
    and select "Dynamic Text" and "Multiline".


  2. Ok now we are going to convert the dynamic textarea into a movieclip . So hit F8 on your keyboard and call the movieclip main_mc.

    Also, you should embed your fonts. Click the Character button. The Character Options dialog box will appear. Check the option for Specify Ranges and select Uppercase, Lowercase, and Numerals if your data may contain numbers:



[ make sure to embed your fonts ]

  1. Give your movieclip and instance name of main_mc as well.

  2. Create an additional layer in your timeline and call it mask. Draw a box covering the main_mc movieclip with the proper dimensions.
  3. Again we are going to convert the box to a movieclip. So hit F8 and call our movieclip mask_mc. Also be sure to give your new movieclip an instance name of mask_mc.
  4. Now we just have to add some actionscript to make it all work. Create a new layer and call it actions. Click inside the 1st frame of your timeline and open your actions pallet. Type the following script into your actions panel:
main_mc.setMask(mask_mc);

Details about setMask:


Availability : Flash Player 6

Usage : main_mc.setMask(mask_mc)

Parameters:
main_mc The instance name of a movie clip to be masked.
mask_mc The instance name of a movie clip to be a mask.