Hands-On: Flash MX 2004 the BasicsExercise 6: Linking a Text File into a Dynamic Text FieldThis exercise will show you how to link a .TXT file to a Flash movie. You could consider this text file to be from a database or an external file, however, for the exercise we will only use a pre-written external file saved as .txt. The nice thing about linking a text file is that you can update the file outside of the Flash movie and the Flash movie will update automatically. This text file can include HTML coding and in another exercise I’ll show you how to add Cascading Style Sheets coding too. The text file you will be linking to is the Martin Luther King, “I’ve got a Dream” speech. In part two and three exercises you’ll be adding Scroll Buttons and Sound On/Off Buttons for a .WAV file of the speech. This is a preview of what the HTML looks like at the top of the text file: content=<b><i><font size="20pt"> "I Have A Dream"</font></i></b> by <b>Martin Luther King, Jr.</b> <font color="#000080"><i> Delivered on the steps at the Lincoln Memorial in Washington D.C. on August 28, 1963. Source: Martin Luther King, Jr: The Peaceful Warrior, Pocket Books, NY 1968</i></font> The most important part of this .txt file is the word and the equal sign content= this declares that the text within the text file will be assigned to the variable (var) name content. The <b><i><font size="20pt"> is basic HTML that makes the text bold and italic and a rather large font size. The dreamSpeech.fla flash file has a couple of graphics in the Library that will save time for you. Follow these steps:
You can download these two files to create this Hands-On Exercise:http://profal2.com/cis127/pdf/assets/flash/dreamSpeach.fla http://profal2.com/cis127/pdf/assets/flash/dream.txt
|
| Back to Top |