Basically all you do is pass a reference to an instance of a text field on the stage, and the class does the rest. You can pass a property/properties to animate - eg “_xscale”, start values and end values for each, transition time and gap between letters, use custom easing, choose between letter/word/line mode…
Another cool feature is - instead of passing values, you can also pass a function, as long as it returns the correct data type - great for random text animations.
Compatible with Flash 7+.
If you like it - its only $8 - find out more/get it here
Version 2.1 released - completely re-jigged, allows for custom ease, letter/word/line mode, tween tints as well as mc properties, use normal/bold/italic text, use left/centred/right/justified align, text layout now exactly reproduces original text layout, new improved readme and examples, its great
nice flash den submission, i love that site. but you’re charge $8 not $6.
also, if this IS breaking the rules maybe the rules should be changed? it might be cool to have a perma-thread that’s specifically for these kinds of submissions. IT could help the maker make a little cash and it could help all the users gain easier access to code like this.
Haha ok … well, I say its worth getting it cause getting a textbox to split up into letters/words/lines and positioning the resulting movieclips in the exact same place as the original text is not exactly easy - well, it took me some time to crack, ive got some interesting stuff going on under the hood
Hey, a bit off topic, but what do you use to obfuscate your code?
A little more on topic, is your solution more interesting than a loop based on the length of the string that creates new dynamic text boxes and then animates them into place? It doesn’t seem like your text is properly spaced, it looks like it’s based on a static position between each letter. If the text was selectable at the end I’d be more impressed…
I suppose the other more interesting solution would be to do the cutting with the bitmapData class - that would give you accurate representations of each letter and it could become a real text field after the animation.
The text is spaced properly, it must be the font that gives you that impression. You have to turn auto-kerning off currently though (but I’m working on getting around it) - but if you have a textfield on the stage with auto-kerning off, the letters (should) be in the exact same position, Ive tested this with 2 identical textfields, running a transition on only one…
Without giving too much away - my solution involves splitting the source text by newline characters, then for each item in that array, it splits by " ", then adds each item to a 1 line high textbox until the line breaks, using this info to fill a line array, and calculate an offset if needed for centering/right aligning
then it loops through the line array and adds either letters/words/lines, but it doesnt use an arbitrary space, but instead the correct method to calculate where each letter should be.
But you’re better off buying it to find out
Also, theres no reason once the transition is done i cant re-create the original textfield. In fact why didnt I think of that - it would be an easy feature to add, so yea. Why on earth would I use bitmap data? Ill just re-instantiate the textfield…but I think I’ll make that feature optional…as in you have to pass a var “textOnComplete:true” or something
@TheCanadian - What!?!? You didnt know?!?!?! Maaaaan you been missing out
Your code is obfuscated for the preview, perhaps that’s done for you.
I wasn’t suggesting that you use bitmapData for the recreation, just that if you wanted pixel perfect cuts and such with a quite low processor cost - since you wouldn’t be moving vectors around, you could use the bitmapData class. Anyhow it looks like you’ve done a good job already, if the kerning and such is actually properly calculated. (Which impresses me!)
You should use a more standard font, I think it’d help the credibility of the class - something that people are used to seeing so that they can better judge it. I’d love to see it turned into a normal text field at the end - if it’d be easy to reproduce I think it’d really be like, “Wow it really matched the original perfectly!”
I think Source/Experiments is kind of like this. The problem with forums like that is that a bunch of newbs (Andy92) and spammers would mob it. So a defined set of rules would be needed. (Like post-count has to be over a certain amount to post there or something.)
@matthewjumps Excellent job! I’d buy it if I still did Flash work. I think the fact that you’ve spent a long time developing this and have contributed to the community is an excuse for some self promotion, especially since this class is good enough to be promoted. Also the fact that you considered (And possibly implemented.) the suggestions of another member also reinforces your kCharacter.
I hereby induct matthewjumps into “Eshy’s kHall of Fame, Honor, and Chung King Noodles”.
As far as implementing features others suggest - thats the plan all the way as far as im concerned, i just want the class to be as powerful and useful as possible