The SlideShow.next() method displays the next image in the stack. This action is
only possible after all the images have been preloaded; using it before simply does nothing. To use
the next() method properly, the class has a single event ( onLoad on Flash 6 to 8 and Event.COMPLETE
on Flash 9) that can be used to monitor the loading status. In the Main.main() function a handler for the
load event displays the first image as soon as all the collection is available; thereafter a new image fades
in each time the user clicks the left mouse button somewhere on the movie.
The SlideShow constructor accepts an integer argument that is the total number of images to load;
images must have a specific name ( imgX.jpg where x is a number between 0 and the total number
of images) and must be located in a subfolder called images . You can easily change the class to obtain
the image paths from an array of values or better yet from a list generated by the server.
To obtain the best visual effect, use your image editor of choice to resize all the images to the same size as
the Flash movie.
Pages:
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648