First time here? First time here? Newsletter Signup Newsletter
651326 Members and growing! | Flash Jobs
Search tutorials
Author: Bjern Potgieter | Website: http://photoguide.4t.com
Create a new flash movie, set everything up as you like it. At the same time create a text file with all your quotes in it but something like this... You can even copy this code for the mean time to get the idea.

        quote0txt=The+scenery+never+changes+if+you're+not+the+lead+dog
quote1txt=Every+dog+has+it's+day
quote2txt=Commitment+is+the+igniter+of+momentum
quote3txt=Don't+miss+the+magic+of+the+moment+by+focusing+on+what's+to+come
quote4txt=Enthusiasm+generates+success+and+breeds+excellence

Paste the above text in our special Flash Variables Translator and convert it from 'English to Flash'. What appears in the bottom is what flash understands and reads. Copy this text junk to your quotes text file and save it as 'quotes.txt'. What you hav done now is set up an external file that Flash loads when it is run. So if you upload new quotes every now and then great, at least you don't have to redesign your Flash movie.

Somewhere in your movies load up you need to add the folowing action in the action panel... loadVariablesNum ("quotes.txt", 0); This loads the variables you've just created and saved. The next step is to create a dynamic text box (I'm assuming you now what that is - if not refer to the Dreamweaver help). Name your text box like I have as 'myquote'. Now wherever you want your quote to appear you need to insert the following actionscript:

newquote = random(numQuotes);
_root.myquote = eval("quote" +newquote+ "txt");

Explanation: You're creating a variable called 'newquote' which random chooses a number between 0 and 'numQuotes'. then going to 'myquote' text box fill in the randomly chosen quote. To see an example of this visit the Home page. Although there I have used a mouseover effect that displays a different quote every time. The options are unlimited.

» Level Intermediate

Added: 2001-04-23
Rating: 6 Votes: 72
(10 being the highest)
» Author
I design web sites for a little pocket money and for the learning experience. I like to share what I've learnt with others...
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!

Comments

  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: doc_chin7
» Description:

The flash's horizontal road drive was done in CS4 and was upgraded to CS6. The car responds to right/ left key and flash will auto-generate the movement of roads from left-right or right-left based on random number. Have fun driving in this virtual environment and avoid other cars... :) If you are creative, a road driving game can be created from it.

Featured Sound Loops
Image for equalize

Audio Player

» Author: BoxCat
» Title: CPU Talk
» Description: From the cyberpunk RPG, "Nameless: the Hackers" Completely Free to use! Keywords: edm hip hop rap electronic mysterious mission hacking chase exciting spy ios ambient chilling love happy sad angry suspense
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: nathan
» Description:

A recorded sound of the Dimensional Fork Gate.