MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH Especificaciones Pagina 127

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 152
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 126
Add ActionScript code 127
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 127 explains this code
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.
000_Getting_Started.book Page 127 Friday, September 2, 2005 12:22 PM
Vista de pagina 126
1 2 ... 122 123 124 125 126 127 128 129 130 131 132 ... 151 152

Comentarios a estos manuales

Sin comentarios