MACROMEDIA STUDIO 8-EXPLORING STUDIO 8 Manual page 246

Table of Contents

Advertisement

246 Tutorial: Building Your First Flash Application
menu_mc.description_txt.text =
this["image"+currImage+"desc"];
for (var i:Number = 0; i<totalImages; i++) {
slideShow_mc.slides_mc["holder"+i].loadMovie(this["image"
+(i)+"uri"],slideShow_mc.slides_mc.getNextHighestDepth
());
}
slideShow_mc.slides_mc["holder4"].loadMovie(this["image0u
ri"],slideShow_mc.slides_mc.getNextHighestDepth());
// function for the Next button
function nextMenuItem(eventObj:Object) {
slideShow_mc.gotoAndPlay("slide"+(currImage));
if ((currImage+1)>=totalImages) {
currImage = 0;
} else {
currImage++;
}
menu_mc.title_txt.text =
this._parent["image"+currImage+"title"];
menu_mc.description_txt.text =
this._parent["image"+currImage+"desc"];
}
// add the event listener for the button
next_btn.addEventListener("click", nextMenuItem);
"Review the ActionScript code" on page 246
in detail.
4.
Save your document.
5.
Select Control > Test Movie.
6.
In the Test Movie window, click Next to watch the animated images of
food and see the titles and descriptions update for each slide.
7.
Close the Test Movie window.
Review the ActionScript code
This section explains what the ActionScript you just added to the Actions
panel is doing. If you prefer, you can skip this section and move on to
publishing your document for display in a web browser.
Complete information about working with ActionScript can be found in
Learning ActionScript 2.0 in Flash.
explains this code

Advertisement

Table of Contents
loading

This manual is also suitable for:

Studio 8

Table of Contents