vdheyning Posted January 5, 2010 Share Posted January 5, 2010 import com.greensock.*; var timeline:TimelineMax = new TimelineMax({repeat:3, yoyo:true, repeatDelay:1.5}); timeline.append( TweenLite.from(blackBar, 0.8, {x:550}) ); timeline.insertMultiple( TweenMax.allFrom([logo, timelineWord, maxWord, byGreenSock], 0.5, {autoAlpha:0}, 0.25), 0.6); timeline.insertMultiple( TweenMax.allFrom(lettersArray, 1, {y:"-30", alpha:0, ease:Elastic.easeOut}, 0.04), 1.4); Dear Mr Greensock, Having watched your video things did indeed become a lot clearer, but I'd like you to shed some light on the lettersArray in this example, could you give me the code that defines the array, or an fla example that uses exactly that code? Thanks, Fam Link to comment Share on other sites More sharing options...
GreenSock Posted January 5, 2010 Share Posted January 5, 2010 To create the lettersArray, you could use this: http://blog.greensock.com/splittextfield/ or split the TextField apart manually in the IDE and make each one a dynamic TextField with an instance name and populate the array yourself. Make sense? Link to comment Share on other sites More sharing options...
vdheyning Posted January 5, 2010 Author Share Posted January 5, 2010 thanks for the link to the splitTextField, yet again I could have saved myself a lot of time if I had asked you first! here's where you're loosing me: populate the array yourself. Make sense? here's what I'm trying to achieve, after a bunch of mc are nicely alpha-ing in, I would like them to all alpha out again at once...I can just append and use a negative number but I'm sure there's an easier way to do this, can I make an array? Is it called something else? Am I being clear? Most likely not, but living in hope! Thanks! fam Link to comment Share on other sites More sharing options...
GreenSock Posted January 5, 2010 Share Posted January 5, 2010 You can populate an array like [mc1, mc2, mc3]. There were several things you could do to simplify your code. I've attached a revised FLA that shows some improvements. I commented out your lines above with mine below that replaced them. Link to comment Share on other sites More sharing options...
vdheyning Posted January 5, 2010 Author Share Posted January 5, 2010 There's not a smiley face in your smilies array that adequately shows how happy I am! I thank you so much! Fam Link to comment Share on other sites More sharing options...
vdheyning Posted January 5, 2010 Author Share Posted January 5, 2010 Again thank you for your help, however, the TweenLite does not seem to work in the series of appends... see attached, I commented the first one out as I could add the mc to the array, but I don't quite know what to do with the next one... Any ideas? Thanks, Fam Link to comment Share on other sites More sharing options...
vdheyning Posted January 5, 2010 Author Share Posted January 5, 2010 Never mind, when I changed the alpha to autoAlpha it worked! thanks, Fam Link to comment Share on other sites More sharing options...
GreenSock Posted January 5, 2010 Share Posted January 5, 2010 Yep, that's exactly what I was going to say. I'm sure alpha was working, but you couldn't see it because visible was set to false (from the previous autoAlpha:0). Link to comment Share on other sites More sharing options...
renderview Posted January 21, 2010 Share Posted January 21, 2010 Hallo, here again a beginner ask boring question!! The smaple "Betlem_Banner4.fla" doent run. I got a message "Unexpected file format"!?? But i have the same problem. I try: //var lettersArray:Array = ["a", "b", "c", "d", "e", "f", "g"]; //var txt:String = "That is a test of tweening"; //var lettersArray:Array = txt.split(""); //var lettersArray:Array = new Array( ); //lettersArray.push("a", "b", "c", "d"); var lettersArray:Array=[mc1,mc2,mc3]; Only the last works but not like in the sample in your site. It stay still and jump a little up and down, even there will not include by aplha disapear. I wonder why no one of the first 3 is working!! What is wrong?? Greetings Wolfgang Link to comment Share on other sites More sharing options...
GreenSock Posted January 21, 2010 Share Posted January 21, 2010 I wonder why no one of the first 3 is working!! What is wrong?? You must tween DisplayObjects on the stage, like TextField instances or MovieClips or Sprites. Your first few examples just created arrays populated with Strings. Strings cannot be seen on the stage. 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