128 Tutorial: Building Your First Flash Application
The first section of code contains variables that store information about the
images that will appear in each section of the
slideShow
movie clip.
/* 0 */
var image0title:String = "Summer salad";
var image0desc:String = "Butter lettuce with apples, blood
orange segments, gorgonzola, and raspberry vinaigrette.";
var image0uri:String = "images/image0.jpg";
/* 1 */
var image1title:String = "Turkey and Sun-dried Tomato
Sandwich";
var image1desc:String = "Fresh roasted turkey with sun-dried
tomatoes, garlic aioli, and havarti.";
var image1uri:String = "images/image1.jpg";
/* 2 */
var image2title:String = "Seared Salmon";
var image2desc:String = "Filet of wild salmon with
caramelized onions, new potatoes, and caper and tomato
salsa.";
var image2uri:String = "images/image2.jpg";
/* 3 */
var image3title:String = "New York Cheesecake";
var image3desc:String = "Creamy traditional cheesecake
served with chocolate sauce and strawberries.";
var image3uri:String = "images/image3.jpg";
This code declares four sets of three variables each. Each set of three
variables represents one of the four images that your Flash document
displays. The only difference between the variable names for the four
different images is the number that is included in the variable names. The
numbering starts with the number 0 instead of 1. This is because lists in
ActionScript are zero-based. This means that the first item in the list is
always referred to by the number 0 rather than the number 1.
The three variables that are declared for each image are as follows.
Remember that the number in the middle of each variable name changes
for each image:
image0title
contains a string that is the name of the dish that appears in
the title_txt text box in the
menu
movie clip.
image0desc
contains a string that is the description of the dish that
appears in the description_txt text box in the
menu
movie clip.
000_Getting_Started.book Page 128 Friday, September 2, 2005 12:22 PM
Summary of Contents for FLASH 8-GETTING STARTED WITH FLASH
Page 1: ...Getting Started with Flash...
Page 26: ...26 Introduction...
Page 94: ...94 Flash Basics...
Page 152: ...152 Index...