| Register
Sunday, July 20, 2008   

TextScript: The Text Effect Infrastructure

Created By  Satori Canton, at  2/16/2006 - 47 comments.

Click to view this author's website.

Update 3/6/2006: Our friend Carmelo Condorelli has translated this article into Italian

A few months ago, I published a Tile Transitions component (source code was released yesterday) that a lot of people seemed to like. It was just a bunch of experiments that I was doing to learn the new features in Flash 8, and not really thought out to be a component until after the fact.

I was thinking of creating the same type of transition effects class for use with text. Something that would exploit the new expressiveness features of Flash 8. But this time, I started with the community in mind and wanted to create a class that we could all use.

I wanted to create a class that would manage all of the laborious elements of creating text effects, but still allow us to easily create new custom effects. After messing around with a number of different techniques, I finally settled on a class I'm calling TextScript. It has a number of predefined effects built into it. But the best thing is that you can use it to create any custom text effect you could imagine.

TextScript has basically two types of methods (Constructive and Deconstructive). The constructive methods create a movie clip that holds additional movie clips displaying individual characters of your phrase. Deconstructive methods are much simpler, because they work with the movie clip holder that is returned from a constructive method call to apply an effect that deconstructs the individual images representing your phrase.

Let's start with an example. Download the TextScript class and save it into the classpath you have set in Flash. If you don't have a classpath set in Flash, search Flash help for the phrase "Modifying the classpath" (with the quotes) for info to set one up.

Next, create a new FLA, select the Text Tool (T) in Flash and draw a dynamic text box on the stage (or just off the stage). It doesn't need an instance name. We're just going to use this to embed the fonts that we'll need. NOTE: If you do not embed the font you are using for the text effects, your effects will never be visible.

Select the dynamic text field and select a non-system (not _sans, _serif or _typewriter) font. For my example, I used Arial Black with a Bold font weight. If you are using a bold font, the text field embedding it must be set to display bold for that particular font to be embedded. Click the "embed…" button and select Upercase, Lowercase and Numerals, and click OK.

Now, add the following code to frame 1 of the timeline:

Test the movie and you should see a nice effect of the text blurring into focus. If you don't see the text, be sure that you've embedded the font "Arial Black" in your dynamic text field and be sure that the Bold button is pressed for that same text field.

In this code, we start by importing the TextScript class. We then set up how we want the text to appear by creating a TextFormat object and setting a few properties of it. We then set up the parameters we'll need for the TextScript constructive method.

All constructive methods require the following parameters (in this order):

TextScript.constructiveMethod(scope, phrase, xLoc, yLoc, textFormat, delay)
scope : MovieClip - The movie clip into which the text phrase will be placed.
phrase : String - a string representing the text that you want displayed
xLoc : Number - the desired _x location of the phrase within the scope
yLoc : Number - the desired _y location of the phrase within the scope
textFormat : TextFormat - a TextFormat object describing how you want the phrase to appear
delay : Number - the number of frames that should pass between characters coming onto the stage

Constructive methods always return an instance of the movie clip containing your text. You should usually save this into a variable (I called mine 'm') so that you can later use it as a parameter in a deconstructive method.

As a naming convention, all deconstructive methods begin with the word "remove" and usually concatenate the name of its constructive analog. So, the constructive method 'blurIn' has a complementary deconstructive method called 'removeBlurIn'. But it's not at all necessary to use the corresponding deconstructive method. Any combination of constructive and deconstructive methods can be used to create a variety of effects.

Underneath the code we've already created in our example, add the following code:

Now, test the Flash movie. You should see your text blur into view. When it's complete, click the stage and you should see the text blur away from view. Further, if you open up the Debugger, you'll see that TextScript deconstructive methods clean up all of the assets that it created in the constructive method.

The predefined constructive methods in TextScript are:

typewriter
zoomIn
zoomOut
blurIn
dropIn
randomDropIn

The corresponding deconstructive methods are:

removeTypewriter
removeZoomIn
removeZoomOut
removeBlurIn
removeDropIn
removeRandomDropIn

In and of themselves, these methods make some very nice text effects. But the reason that there are so few text effects included in the class is that the class itself can be used to create any text effect you wish. Have a look around the class file. In my next article, I'll explain how to inject your own custom TextScript effects into the class to create your own insane text effects in just a few lines of code.

Need Professional Help For Your ActionScript Project?
ActionScript.com Consulting Services provide top quality professional ActionScript consulting to businesses around the globe. If you have a professional project in need to world-class talent, tell us about your project by requesting a quote today.

Reader Comments

  1. Han Zikey  Replied:
    ( 2/17/2006 At 5:07 AM)

    Great!I have used your Tile Transitions component.They are very nice!Thank you,Satori Canton!

  2. alex b  Replied:
    ( 2/18/2006 At 8:33 PM)

    that looks so f**kin amazing =D

  3. Gabe Nicholson  Replied:
    ( 2/18/2006 At 9:04 PM)

    I guess I know what I'm doing all weekend. Thanks Satori! Very cool stuff!

  4. jaime cavazos  Replied:
    ( 2/23/2006 At 5:00 AM)

    That's a great Class, thanks for taking the time to share. Is there any way to enable the text effects to use multiline layout? I noticed that it just builds the effects on a single line. Is there some way to tweak this?

    Thanks,
    Jaime

  5. Satori Canton  Replied:
    ( 2/23/2006 At 12:43 PM)

    The few methods that are included in the class only build on one line. Multi-line effects could be created with two different method calls. But the class is designed to be able to build just about any effect you can imagine. I'm just finishing up a follow up article that I'll be posting soon showing how to use this class to create custom text effects (which could include multi-line effects)

  6. Tom Rowley  Replied:
    ( 3/13/2006 At 6:02 PM)

    Great class Satori. I too needed the class to work on multiple lines, but couldnt work out how to do it through the custom text effects.

    I did hack your code a little tho to achieve a decent result.

    I extended the functions to include paraWidth and lineHeight so you would use it as follows:

    m = TextScript.blurIn(this, phrase, xLoc, yLoc, myFormat, delay, paraWidth, lineHeight);

    Then in the TextScript.as I did the following amendments:

    changed the createEffect function:
    --
    public static function createEffect(scope:MovieClip, phrase:String, x:Number, y:Number, format:TextFormat, delay:Number, paraWidth:Number, lineHeight:Number, effect:Function):MovieClip {
    var m:MovieClip = TextScript.createText(scope, phrase, x, y, format, paraWidth, lineHeight);
    TextScript.configureEffect(m, effect, delay);
    return(m);
    }
    --

    Changed all the predefined create effect functions, of which this is one(There are 6 in total to edit):
    --
    public static function typewriter(scope:MovieClip, phrase:String, x:Number, y:Number, format:TextFormat, delay:Number, paraWidth:Number, lineHeight:Number):MovieClip {
    return createEffect(scope, phrase, x, y, format, delay, paraWidth, lineHeight, TextScript.getInstance().typewriterTransition);
    }
    --

    And lastly changed the createText function to the following:
    --
    private static function createText(scope:MovieClip, phrase:String, x:Number, y:Number, format:TextFormat, paraWidth:Number, lineHeight:Number):MovieClip {
    var teText:MovieClip = scope.createEmptyMovieClip("ascTextPhrase" + scope.getNextHighestDepth(), scope.getNextHighestDepth());
    teText.characterArray = new SatoriArray();
    teText.remove = function(m:MovieClip):Void {
    this.characterArray.removeItem(m);
    m.removeMovieClip();
    if(this.characterArray.length == 0) {
    this.removeMovieClip();
    }
    }
    var l:Number = phrase.length;
    var originalx=x;
    var originaly=y;
    for(var i:Number = 0; i < l; i++) {
    var m:MovieClip = TextScript.createCharacter(teText, phrase.substr(i, 1), format);
    m.removeSelf = function() {
    this._parent.remove(this);
    }
    m._x = x;
    m._y = y;
    m.characterLength = l;
    teText.characterArray.push(m);
    x += format.getTextExtent(m.field.text).width;
    if(x>=paraWidth+originalx&&m.field.text==" "){
    x=originalx;
    y=y+lineHeight;
    }
    }
    while (l--) {
    teText.characterArray[l].characterArray = teText.characterArray.slice(0);
    teText.characterArray[l].phraseHeight = teText._height;
    teText.characterArray[l].phraseWidth = teText._width;
    }
    return(teText);
    }
    --

    This checks each end of word to see whether its beyond the paraWidth size, and if it is, starts a new line using the lineHeight.

    This isnt perfect, as I would prefer a proper word wrap solution, which would look ahead to see if the next word will extend past the paraWidth, and then start the next line if this is about to happen.

    the upshot is a "pseudo" word wrap which works ok, but with the occasional long word sticking out further than it should.

  7. Ryan M  Replied:
    ( 3/29/2006 At 2:35 PM)

    Great class, very handy stuff - saved me a lot of time! Although, it would be nice if rather than specifying x and y coordinates for the text to be displayed, the text could be placed inside a Text box (made using the Text Tool) with a specific Instance Name. The reason I'd like to do this is sometimes I want the text to be on a slope - like when you make a Text box and rotate it slightly.

    Is this at all possible?

  8. Satori Canton  Replied:
    ( 3/29/2006 At 10:48 PM)

    Hi Ryan,

    The text is contained in a movie clip that is returned when a constructive method is called. You could rotate that movie clip.

    I've also had some cool effects by applying filters to that movie clip as a whole. Like if I wanted all of the text to have the same drop-shadow, you can apply the drop-shadow to the resulting movieclip and it will cover the whole text effect.

  9. Firdosh Tangri  Replied:
    ( 4/7/2006 At 8:18 PM)

    hey all ,
    I downloaded the new TextScript zip file and I cannot see anything on the stage even after I set the path to the classes.

    thanks
    cheers
    firdosh

  10. Satori Canton  Replied:
    ( 4/8/2006 At 2:37 AM)

    Firdosh,

    The most common cause of this kind of problem is that the Fonts are not correctly embedded in the FLA. If you want to send me your FLA, I'll have a look at it.

    satori (at) actionscript (dot) com

  11. Rajat Paharia  Replied:
    ( 4/16/2006 At 12:00 AM)

    Tom -

    Thanks for posting all that multi-line code. Very very useful.

    best, - rajat

  12. Nick Brown  Replied:
    ( 4/16/2006 At 7:51 PM)

    Firdosh,

    I think you need to restart flash once you've copied the files over. It didn't work for me first time, I restarted and now it's fine. Eclipse seemed to pick them up straight away..

    Nice effects Satori :)

    Cheers,

    Nick

  13. Rajat Paharia  Replied:
    ( 4/18/2006 At 2:32 AM)

    Satori -

    I just hit a showstopper. If I have any v2 components in my movie, TextScript no longer works. Any ideas?

    Thanks, - rajat

  14. Satori Canton  Replied:
    ( 4/18/2006 At 4:09 AM)

    No way! The show must go on! As much as I'm a fan of v2 components (which I'm not) I can't believe they're jacking up TextScript. TextScript is cleanly encapsulated and protected from the evils of v2 components.

    How do you mean it no longer works? Maybe a font embedding issue?

  15. Rajat Paharia  Replied:
    ( 4/18/2006 At 4:21 AM)

    Hey Satori -

    I run the demo FLA that you included in the TextScript zip. It works fine. I drop a v2 Button on the stage and try to run it, and I no longer see anything. No TextScript magic, very sad. I remove the Button from the stage but leave it in the library, and the problem remains. It's not until I remove it from the library that TextScript starts working again.

    I also experimented with the Flash MX UI Components, and there's no problems with those, it's only v2.

    Maybe some naming collision with v2? I dunno. Let me know if you'd like me to send you any of my test files.

    Eagerly awaiting a resolution :) - rajat

  16. Satori Canton  Replied:
    ( 4/18/2006 At 4:42 PM)

    I have been able to recreate the issue, but I'm not sure what's causing it. You're right, that if you have a v2 component (even just in the library) and you're trying to create a TextScript effect on the root timeline, it jacks up. But I'm not sure what's jacking it up.

    If you take the code in my example FLA and paste it into an empty movieclip, it works fine (even with v2 components). This is just a work around. I need to research the cause further.

  17. Rajat Paharia  Replied:
    ( 4/18/2006 At 11:12 PM)

    Tom -

    I adjusted your multi-line code to do word wrap with lookahead. Below is the new createText function. A couple of things to note:

    - I was having problems using getTextExtent for letter placement on machines that didn't have my font installed (see http://chattyfig.figleaf.com/mailman/htdig/flashcoders/2003-June/078355.html). Letters were being crammed together and spaced funny. Switching to using textWidth solved that problem for me. Satori mentioned that this might cause problems with certain exotic fonts.
    - How it works: any time we see a space, we grab the next word and put it in a new movieclip. We then add the new word clip's textWidth to our current x and if it's more than the original x + the paragraph width, we jump to the next line. If not, we continue as normal. And we delete the new word clip when we're done with it.

    - rajat

    private static function createText(scope:MovieClip, phrase:String, x:Number, y:Number, format:TextFormat, paraWidth:Number, lineHeight:Number):MovieClip {
    var teText:MovieClip = scope.createEmptyMovieClip("ascTextPhrase" + scope.getNextHighestDepth(), scope.getNextHighestDepth());
    teText.characterArray = new SatoriArray();
    teText.remove = function(m:MovieClip):Void {
    this.characterArray.removeItem(m);
    m.removeMovieClip();
    if(this.characterArray.length == 0) {
    this.removeMovieClip();
    }
    }
    var l:Number = phrase.length;
    var originalx=x;
    var originaly=y;

    for(var i:Number = 0; i < l; i++) {
    var m:MovieClip = TextScript.createCharacter(teText, phrase.substr(i, 1), format);
    m.removeSelf = function() {
    this._parent.remove(this);
    }
    m._x = x;
    m._y = y;
    m.characterLength = l;
    teText.characterArray.push(m);

    // -----------------------
    // BEGIN new word wrap code
    var nw:String;
    var ns:Number;
    if (phrase.substr(i, 1) == " ") {
    // location of next space
    ns = phrase.indexOf(" ", i+1);
    if (ns == -1) {
    // go to end of phrase
    ns = phrase.length - 1;
    }
    // next word
    nw = phrase.slice(i+1, ns);

    var nc:MovieClip = TextScript.createCharacter(teText, nw, format);
    // if adding this word is going to go over our boundaries, then
    // reset to the next line.
    if (x + nc.field.textWidth > paraWidth + originalx) {
    x = originalx;
    y = y + lineHeight;
    }
    else {
    // word doesn't push us over boundary.
    x += m.field.textWidth;
    }
    // remove the word clip
    nc.removeMovieClip();

    }
    else {
    // normal letter
    x += m.field.textWidth;
    }
    // -----------------------
    // END new word wrap code

    }
    while (l--) {
    teText.characterArray[l].characterArray = teText.characterArray.slice(0);
    teText.characterArray[l].phraseHeight = teText._height;
    teText.characterArray[l].phraseWidth = teText._width;
    }
    return(teText);
    }

  18. jaime cavazos  Replied:
    ( 4/20/2006 At 1:24 AM)

    Hey Rajat,

    Do you have the revised .as file and a working .fla for your change that I could download? I think I'm doing something wrong when I tried to implement the code. Thanks if advance.

    Jaime

  19. Rajat Paharia  Replied:
    ( 4/21/2006 At 9:16 AM)

    Jaime - You can get the revised class file and a test fla here: http://www.rootburn.com/files/textscript_multiline.zip

    I left the class named TextScript but placed it in the com/actionscript/textMulti directory so I could still use the original if need be.

    best, - rajat

  20. Antonio Cortese  Replied:
    ( 4/23/2006 At 10:45 PM)

    Thanks so much for this class, Satori! You rock, man!

    One question: is there a way to trigger a function once the text has finished writing?

    I need to trigger a second text line only after the first one has finished writing, but so far the only way I've found to do that is by using setInterval, which doesn't always work properly.

  21. Chris Brown  Replied:
    ( 5/26/2006 At 12:13 PM)

    This is incredible class Satori. Have you started a website for this where people can make their contributions?!? If someone else hasn't already, I'll be happy to host it on my site. This is exactly what i've been looking for since I began using flash. Here's my first attempt at a pretty cool effect using the blur filter...

    blurUp = function() {
    if(this.frameCount++ > this.delay) {
    this._visible = true;

    //Tween vars
    this.pos = this._y;
    this._y = this._height;

    //blur vars
    import flash.filters.BlurFilter;
    var blurAmount:Number = 30;
    var blurX:Number = blurAmount;
    var blurY:Number = blurAmount;
    var quality:Number = 1;
    var filter:BlurFilter = new BlurFilter(blurX, blurY, quality);
    var filterArray:Array = new Array();
    filterArray.push(filter);
    this.filters = filterArray;
    this.onEnterFrame=function() {
    //position loop

    this._y = this._y + (this.pos - this._y) / 2;

    //blur loop
    var blurX:Number = blurAmount --;
    var blurY:Number = blurAmount --;
    var filter:BlurFilter = new BlurFilter(blurX, blurY, quality);
    var filterArray:Array = new Array();
    filterArray.push(filter);
    this.filters = filterArray;
    }
    }
    }

    If anyone can optimize this script, that would be cool. I'm still a actionscript noobie, and i'm sure there is a better way to write this out. (actually i'm an all-around script noobie).

  22. preet max  Replied:
    ( 6/7/2006 At 4:26 PM)

    hi, can we insert the text dynamically from text file or XML insted of text mentioned here itself

  23. Satori Canton  Replied:
    ( 6/8/2006 At 12:05 AM)

    The class itself is very open. Any string (regardless of the source (XML, external data, etc.)) can be passed into it.

  24. Behring Bautista  Replied:
    ( 6/9/2006 At 7:18 PM)

    Hi everybody,

    This could be out of the theme, but I tryed to export
    your sample file to MOV
    and I'm getting and error message
    regarding the plublishing settings (quicktime does not soport versions above Flash 5).

    I tryed also AVI but I'm getting an empty (white) movie.

    So here is the question: How can I export this
    text effects to a movie file?

    Thank you very much for your time.

    Behring

    PS
    I tryed third party sofware converting SWF to avi
    without any result.

  25. Satori Canton  Replied:
    ( 6/10/2006 At 12:59 PM)

    You're probably not going to be able to export to a working movie from Flash. When you export to a movie format from Flash, it renders all actual frames (visually what it looks like) without executing code. In the case of the sample files, the actual frames are only one single blank frame on the root timeline. If no code executes, that's all it's ever going to look like.

    The best way that I know (actually the only way that I know) to render a code driven animation into a movie file is to take the Flash movie into Director and render the move from Director. That way, Director allows Flash to execute code and animate, and then Director effectively screen captures the frames and creates a movie file.

  26. Satish Joon  Replied:
    ( 6/23/2006 At 3:42 AM)

    This is good experience with u.

  27. Butum Alexandru  Replied:
    ( 7/14/2006 At 2:29 PM)

    yea ... no need to fear about that ... just a good text script class

  28. George Windsor  Replied:
    ( 7/25/2006 At 1:36 PM)

    Satori. I am running Flash MX Pro 2004, on XP. On downloading your file, i cannot get it to open, and it expresses an unknown file format error. any idea what this may be caused by? Additionally, if someone could confirm my classpaths that would be great.

    $(LocalData)/Classes
    .
    ../preload/

    my swf is in the preload directory, and i unzipped the text class with set directory structure into the preload directory. I can view the actionscript file, but not the fla. any help would be appreciated.

  29. Satori Canton  Replied:
    ( 7/26/2006 At 11:52 AM)

    The sample files are in Flash 8 format. MX 2004 won't recognize them as valid files.

  30. Bill Abel  Replied:
    ( 7/31/2006 At 5:36 PM)

    I'm trying to use TextScript to write a phrase, remove it, and then write another. I'm storing the phrases in an array and want to loop through them. I can't seem to get this to work.

    I keep getting all the phrases drawn at once.

    Any suggestions?

    var xLoc = 0;
    var yLoc = 0;
    var delay = 1;

    phrase = ["selling lemonade by a shady sidewalk", "riding your bike to baseball practice", "walking your child to school"];

    function clean() {
    TextScript.removeBlurIn(this, delay);
    }

    function write(i) {
    TextScript.randomFadeIn(this, phrase[i], xLoc, yLoc, myFormat, delay);
    }

    for (i = 0; i < phrase.length; i++) {
    setInterval(write(i), 3000);
    }

  31. Edwin Rios  Replied:
    ( 8/2/2006 At 2:57 PM)

    HI Satory did you read my request in the forum under
    Open Source File I am eddyperu and I posted today...Could you help me to reslove my problem please
    eddy

  32. Chris Charlton  Replied:
    ( 8/9/2006 At 2:01 AM)

    I see the value in this, maybe a component would be best overall for designers and even team members.

  33. Taras Kravchuk  Replied:
    ( 8/28/2006 At 8:32 AM)

    It's e really great component! Althoug i am having real problems getting to load an external txt into the phrase. What is the code supposed to be? Please help

  34. sam jarry  Replied:
    ( 9/14/2006 At 8:42 AM)

    Very useful component.
    I just have a small problem using it.
    When you use a specific font, the file don't exacltly look the same if this font is not activated on your computer. (mostly, there's a gap inbetween each letter's theorical position and its actual position)
    I have the same problem on both mac and pc.

    I guess anyone has this problem.
    Any idea ?...

  35. adrian pan  Replied:
    ( 10/12/2006 At 6:31 PM)

    im hoping Satori will figure out the external img load.It would make this great component simply incredible. Im not a hard-core programmer, i use Flash for video/dynamic signage purposes, but i can tell its not an easy task for Flash to dynamically render these effects, especially with advanced bitmap smoothing which is used here.I cant see this happening even in robust video apps in real time.
    You did mention the preload img trick and then use them,...i ve mucked around with it, (using common sense not my AS skills lol) and it works...up to a point of course. You can't use heavy shit (tiles under 100px). There is a 1 sec delay on my P4 which is what the CPU needs to render it.
    here's the link...it loads 5 external jpegs

    http://www.firmchannel.com/temp/test_1.html

  36. vinay sharma  Replied:
    ( 12/29/2006 At 4:32 AM)

    Really wonderful class..
    The enhansments may include

    ->Effect and Support
    -> for All fonts
    -> for international characters

    otherwise.. great work

  37. Bill Art  Replied:
    ( 1/18/2007 At 5:18 PM)

    Hi, I'm Bill

    Fantastic stuff:)

    Can you direct me to some code that will make a flying carpet effect? Or, otherwwise, some sort of rippling fabric, flag, drapes effect?

    Thank you

  38. Edgar Mata  Replied:
    ( 1/27/2007 At 10:35 AM)

    Hello, from Mexico. I have used your Text effect class and is great. I was trying to save time using software like Kool moves for text effects but now I don't need anymore! Thank's a lot. Its really useful! Congratulations!

  39. Ilya Pavlichenko  Replied:
    ( 2/15/2007 At 3:28 AM)

    Can I use this class in commercial purposes?

  40. evan richards  Replied:
    ( 3/1/2007 At 7:58 AM)

    hi Rajat,

    i'm having trouble incorporating your multi-line code used for this textScript. Nothing seems to display at all when i test my movie. I have embedded the font properties but still nothing. How do i link your textScript actionscipt file to the document? I have done it using publish settings but still nothing.

    I would appreciate any feedback as i am desparate to get this working.

    Great lesson satori!! Its an awsome script!

  41. Dan Carter  Replied:
    ( 5/19/2007 At 7:39 AM)

    Hi all,

    Satori, your script is awesome and very flexible, thank you!

    Has anyone worked out a way to transition whole words instead of each letter?
    If so, please can you let me know how?

    Many thanks,

    Dan

  42. cliffster red  Replied:
    ( 6/3/2007 At 10:01 PM)

    You're script is SPECTACULAR!!!

    I even got it to work to loop once and then end and continu with my flash banner.

    However can somebody pleace tell me how to decrease the time between each effect... So how to decrease the time between 1 word with text effect to the other word with text effect. I'm having trouble with this, since I can;t get it to work with the delay..or am i looking in the wrong direction here?

  43. spacecataz25  Replied:
    ( 6/21/2007 At 4:41 PM)

    Hey Satori,

    The class looks good, but I have a noob question for you. Seems it works for everyone but myself! ;_; I've gone through your instructions multiple times, examining class paths, font embedding, code...nothing shows up when I preview the movie. Would you happen to have any suggestions?

    I'm not too strong in the scripting department (designer at heart) so any advice is uber appreciated. If it helps I'm using Flash MX 2004 pro.

    Thanks for your time.

  44. Mary Seay  Replied:
    ( 6/22/2007 At 10:12 AM)

    Hey Satori,

    The script looks great, but seems to work for everyone but me! ;_; I'm kind of a noob when it comes to scripting - just getting started and don't pick it up that easily - but I've gone through what could be wrong and I just can't figure it out. I've checked the class paths in my preferences and publish settings, embedded the fonts, copy & pasted your script, reread the tutorial, but nothing shows up in my "test movie" swf. Could I be missing something simple but vital? Any and all help is appreciated.

    Thanks!

  45. Kivanc KARANIS  Replied:
    ( 7/12/2007 At 4:25 PM)

    Hey Satori,
    Great Job, great Class... Thanks for sharing...

    Currently I`m preparing a flash presentation with nothing in the library, just an empty frame and some code in just the first frame, everything is loaded via XML and imported text, images, swfs, flvs etc. . Everything works fine but I was asked text fields to be animated. Thanks to Satori, this class worked perfect, even more stable and powerful than swishmax dynamic text anims.

    I think, most problems with embedded fonts (dynamic fonts) can be solved with a simple trick:

    -get the font(s) to the library (Library/New Font) and name it something (like replacing spaces with underscores)
    -from Linkage, check "Export for Actionscript" and "Export in first frame"
    -in your code, call the font with new identifier name (the font name you`ve given in linkage)

    works great. Just a few KBs/font is increased in the final swf, which is very acceptible today I think. And if you are concerned of file size increase, choose a font with a smaller set defined.

    Thanks Satori...

  46. Heidi Hillenbrand  Replied:
    ( 8/29/2007 At 11:09 AM)

    Great job on the code, Satori.

    I have just one question:
    I tried to move the animating text over as it blurred out with:

    speed=5;
    myScript._x += speed;

    and the script isn't having any effect on it... and when I placed it inside an empty movie clip it wouldn't let me move it over manually eiether.

    Is it possible for me to move the text to the right as it blurs out?

    Thanks very much!
    -Heidi

  47. Lior G  Replied:
    ( 11/18/2007 At 3:00 AM)

    Hi, Looks really cool!
    Check out the little technique I posted for rotating text without embedding fonts. You can elevate the concept in your library:

    http://liorgonnen.blogspot.com/2007/11/rotating-text-in-actionscript-3-without.html

    The main idea is that a text rendering component internally renders itself as a bitmap, and draws this bitmap on its graphics region. The bitmap can be drawn in any angle.

Login to post your comments. If you do not have an account with us please Register.
Copyright 2005 by ActionScript, Inc.   |  Privacy Statement  |  Terms Of Use  |  ActionScript Client Extranet