SoTexty AS3 Text Effects Framework
The core of my FITC presentation revolved around a new as3 text effects framework that I've been working on, which I'm currently calling "SoTexty".
The basic premise of the framework is that it sets up the various "stages" or "states" of a text effect:
- Intro : how the effect appears
- Loop : the "main" effect, this can loop between 1 and infinity times
- Exit : how the effect goes away
- MouseOver : from the loop effect, an optional behaviour reacting to user interactions
- MouseOut : either a "reverse" of the mouseOver, or a different effect
- MouseClick : either a link to the "exit", or an alternate effect
Some of these "states" or "stages" are optional. The framework expects a textfield, along with a list of parametrized effects which are assigned to the various "stages", and then produces the complete effect.
The Framework also comes with a "catalogue" of effect types, which for the moment are:
- BlockEffect : an effect which animates the entire text as one
- SplitEffect : animates the characters in the text individually
- ParticleEffect : animates "particles" which are assigned to populate the "shape" of individual characters
- VectorEffect : animates the vector shapes (points) which construct the individual characters
A basic example of a SoTexty effect can be produced with code that looks something like:
-
override protected function init(tf:TextField):void{
-
-
this._intro_effect=new TextEffect(tf);
-
var f:Fade=new Fade(2,0,1);
-
this._intro_effect.addEffect(f);
-
-
this._loop_effect=new TextEffect(tf);
-
var rf:RandomFade=new RandomFade(0,1,1,3);
-
this._loop_effect.addEffect(rf);
-
-
this._exit_effect=new TextEffect(tf);
-
f=new Fade(3,1,0);
-
f.easing=Elastic.easeOut;
-
this._exit_effect.addEffect(f);
-
-
}
All SoTexty Effects extend one of the "catalogue effect" types, and populates instances of "effect states" with effects like Fade, Move, Scale etc.
The framework uses Grant Skinners GTween for animations. I intend to put it up on google code once I've sorted out some kinks. Hopefully in the coming few months.
The main idea is to take out the "donkey work" of generating common effects for loaders, between game levels, intros etc. Leaving the programmer to focus on the interesting bits of the application (game play etc.)
Click the images below for a few quick samples:
**Apparently throws errors in macs**
Vector Effect

**Apparently this one also, throws errors in macs**
3D Text Effect

Stay tuned, plenty more to come
Tags: text effect texteffect as3 framework sotexty flash fp10





March 3rd, 2009 at 9:01 pm
[...] > SoTexty AS3 Text Effects Framework | sakri rosenstrom [...]
March 10th, 2010 at 8:14 am
Great effects, don’t you want to publish the code?
March 10th, 2010 at 10:28 am
Hi Vasile,
I got sidetracked trying to perfect the 3d text thing. I think the project was a bit ambitious, I’m currently considering slimming it down a bit and releasing a stable first version which I can build on. I think the “vector” effects bit is gonna be a separate library. There hasn’t been much interest in this project, so I haven’t been that motivated, but I do want it for personal use if nothing else, so when time permits, I’ll surely be sharing the code.
June 30th, 2010 at 11:59 am
where is the code ha??