[Event("thumbnailView")] [Event("slideshowView")] 0) { nextPhoto.setStyle("icon", ICON_RIGHT); gallery.selected = gallery.selected - 1; carousel.rotateRight(); if (gallery.selected <= 0) prevPhoto.setStyle("icon", ICON_LEFT_DISABLED); } } private function showNext():void { if (gallery.selected < gallery.photos.length - 1) { prevPhoto.setStyle("icon", ICON_LEFT); gallery.selected = gallery.selected + 1; carousel.rotateLeft(); if (gallery.selected >= gallery.photos.length - 1) nextPhoto.setStyle("icon", ICON_RIGHT_DISABLED); } } private function onShow(event:FlexEvent):void { photoDescription.text = gallery.photos.getItemAt(gallery.selected).description; if (gallery.selected == 0) prevPhoto.setStyle("icon", ICON_LEFT_DISABLED); else prevPhoto.setStyle("icon", ICON_LEFT); if (gallery.selected >= gallery.photos.length - 1) nextPhoto.setStyle("icon", ICON_RIGHT_DISABLED); else nextPhoto.setStyle("icon", ICON_RIGHT); carousel.reset(); } ]]>