Hallo, Flash-loving people,
I'm a writer of stories and I want to make a Flash app that will scroll text whilst music plays. The music part is easy, but scrolling the text...
I've tried simply importing ALL of the text, resizing, and scrolling that one giant object upwards, but when the screen was full of text it began to slow down. I need the speed uniform to sync it with the music in the background.
I could have a 70,000,000,000 frame movie and move each element individually, avoiding the heavy load, but the amount of work on my end this would require would be so astronomical that it just wouldn't be worth it. Ideally I want something like a component that I can dump text into and have it deal with making the scroll speed uniform.
It would also be a major plus point if it could be used/created by another program, so that someone without Adobe Flash could produce a similiar kind of movie simply by putting in their text and MP3 file and hitting a "Generate" button, but this is optional. This way I could share it with my fellow writers, but hey, if it's all mine all mine, that's not a bad thing for me!
Does anyone have any idea how this can be done, or any hints as to where I can look?
Many, many thanks in advance.
In your music file, you can place cue points, markers, that can then be read by Flash. Here's an article on that: http://help.adobe.com/en_US/Soundbooth/2.0/WSA5A1DDFB-6BE2-4486-BE0C-A10CEEF119ADa.html
To display the text you can use either a TextField object or a TextArea component. I would use a TextField myself. You can write the actual text in an external file and import it at runtime. Here's info on TextFields: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/TextField.ht ml?filter_flash=cs5&filter_flashplayer=10.2&filter_air=2.6#includeExamplesSummary Here's a tutorial on importing text: http://www.republicofcode.com/tutorials/flash/as3externaltext/
You will need to use the scrollV property of the textfield to scroll the text. You should be able to find an example of that. Then you use the cue points in the sound file tell the textfield to scroll a line at a time.
If you use an external sound file and an external text file, you can plug in any external files and re-use the same code.
Trying this right now. RIGHT NOW.