Search Tutorials
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 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); 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.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||
|