
Add ActionScript code 247
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_ExploringStudio.book Page 247 Tuesday, August 30, 2005 9:30 AM
Summary of Contents for STUDIO 8-EXPLORING STUDIO 8
Page 1: ...Exploring Studio 8...
Page 8: ......
Page 42: ...42 Learning Studio...
Page 134: ...134 Web Development Workflow...
Page 136: ......
Page 162: ...162 Tutorial Creating Page Mock ups...
Page 182: ......
Page 194: ...194 Tutorial Handling Photographs...
Page 254: ...254 Tutorial Building Your First Flash Application...
Page 266: ...266 Tutorial Building a Video Player Flash Professional only...
Page 268: ......
Page 294: ...294 Tutorial Adding Content to Pages...
Page 324: ...324 Tutorial Formatting Your Page with CSS...
Page 332: ...332 Tutorial Publishing Your Site...
Page 342: ...342 Tutorial Setting Up Your Website for Contribute Users...
Page 350: ...350 Index...