问题描述:

I am looking for some help in creating a simple program.

I would like to read in a text file containing maybe 2000 words. I'd like to split this file into individual words and have them zoom from the center of the screen real small like to really large and then disappear. Then the next word comes... ect... I would like to speed up and slow down the speed of the text appearing.

So I am thinking I read in the file, split it by " " spaces I guess, fill an array with the individual words, size them at 1px and then tween them to say 50px.

Are there any hints or libraries or the like that any of you can suggest to me?

Thanks!

网友答案:

I'd use a GUI for that, repaint the message after some milliseconds using timer which i believe would be a good way to speed up and slow down the speed of the text as you wish. You could use two timers, one to control the size of the image and the other to traverse through your words. I'd also use a list instead of an array for easier traversing

网友答案:

Java? You got a long way to go! Basically you will be first creating your own browser and would need libraries to incorporate "javascript" and other high level scripting languages. Greensock http://greensock.com/gsap has some text splitting features in their Pay'ed version but you still have a lot of work to do in order to make it work with Java. Javascript should give you no issues.

相关阅读:
Top