String « Actionscript Programming « Flash Tutorials

Home
Flash Tutorials
1.Actionscript Programming
2.Animals
3.Animation
4.Colors
5.Design
6.Effects
7.Game Cartoon
8.Humans
9.Models
10.Nature
11.Operations
12.Shapes
Photoshop Tutorials
Maya Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
Flash Tutorials » Actionscript Programming » String 
do_btn.addEventListener(MouseEvent.CLICK, showStringInfo);

Open up flash and make 3 text boxes like above. Make one and input text box with an instance name of input and the other two dynamic text boxes with instance names ouput1 and output2.

Line 1: Defining tail_len variable at 2. What is tail_len? It's the length in pixels of the fixed part between two nodes.

This morning i needed to reduce any given string to a certain length and then place a pattern at the end of the string, in this case a simple '....' but the reduction had to take into account full words, meaning, i didnt want to just split the string in any old place and leave parts of a word in the final string. So i created this little String Exstension which i thought may come in useful for some other people! Seems to work great for me....

w___w_w_._j__a_v___a2s__._c__om_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.