Share Posted March 16, 2010 I have created a dynamic text box on the stage with my text. I have embeded the font in the library and this is my script; import com.greensock.TweenMax; import com.greensock.text.SplitTextField; import com.greensock.easing.*; text_tf.embedFonts = true; var stf:SplitTextField = new SplitTextField(text_tf); for (var i:int = stf.textFields.length - 1; i > -1; i--) { TweenMax.to(stf.textFields, 1, {blurFilter:{blurX:10, blurY:10}, x:Math.random() * 650 - 100, y:Math.random() * 350 - 100, scaleX:Math.random() * 4 - 2, scaleY:Math.random() * 4 - 2, rotation:Math.random() * 360 - 180, autoAlpha:0, delay:Math.random() * 0.5, ease:Quad.easeIn, repeat:1, yoyo:true, repeatDelay:1.2}); } looks good but it squishes the text on 1 line. thanks Link to comment Share on other sites More sharing options...
Share Posted March 16, 2010 Did you make sure your TextField looked exactly the way you expected BEFORE introducing SplitTextField? Remember, by default, Flash will make the text all be on one line - you must set the multiline and wordWrap properties to true if you want it to wrap. Also, setting embedFonts to true doesn't automatically embed the fonts - you must also make sure that the font is in the swf to begin with (typically by clicking the "embed fonts" button in the IDE and selecting the characters). Link to comment Share on other sites More sharing options...
Author Share Posted March 16, 2010 got it going. thanks. yes i had it looking the way i wnated with multiline and word wrap before. But i had not clicked on the "character embedding" button and ebedded it that way, which after did, the multiple lines were no longer squished. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now