RE: [flexcoders] Image Slide Show(Quick One)
Hi All, I just want to confirm that can we load all the images directly in the array instead of storing image sources in that. If we can do this then this will really help because then we can load big resolution/sizes images also in the slide show. Thanks Kumar _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of KP Sent: Friday, December 01, 2006 3:20 PM To: 'Lachlan Cotter'; flexcoders@yahoogroups.com Subject: RE: [flexcoders] Image Slide Show(Quick One) Thanks Lachlan. Well I was also doing same but I got stuck in the images repeating logic .thanks a lot for this one. Kumar :-) _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Lachlan Cotter Sent: Friday, December 01, 2006 3:03 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Image Slide Show(Quick One) Hi Kumar, Perhaps something like this? ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe. http://www.adobe.com/2006/mxml com/2006/mxml layout=absolute xmlns:local=* creationComplete=init() mx:Script ![CDATA[ import mx.controls.Alert; public var timer:Timer; public var imageURLs:Array = ['image1.jpg', 'image2.jpg', 'image3.jpg']; public var currentIndex:Number = 0; [Bindable] public var currentImage:String = imageURLs[currentIndex]; public function init ():void { timer = new Timer(500); timer.addEventListener(TimerEvent.TIMER, changeImage); timer.start(); } public function changeImage (e:TimerEvent):void { currentImage = imageURLs[currentIndex++ % imageURLs.length]; } ]] /mx:Script mx:VBox mx:Label text={currentImage}/ mx:Image source={currentImage}/ /mx:VBox /mx:Application Cheers, Lach On 30/11/2006, at 12:48 AM, KP wrote: Hi All, Well I want to know some simple approach for creating an image slide show. I have an XML file containing all path and source of the images. I don't want to give any more functionality except that images should changes every 5sec. Can some one suggest a quick and easy approach on this one Thanks, Kumar
RE: [flexcoders] Image Slide Show(Quick One)
Thanks Lachlan. Well I was also doing same but I got stuck in the images repeating logic .thanks a lot for this one. Kumar :-) _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Lachlan Cotter Sent: Friday, December 01, 2006 3:03 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Image Slide Show(Quick One) Hi Kumar, Perhaps something like this? ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe. http://www.adobe.com/2006/mxml com/2006/mxml layout=absolute xmlns:local=* creationComplete=init() mx:Script ![CDATA[ import mx.controls.Alert; public var timer:Timer; public var imageURLs:Array = ['image1.jpg', 'image2.jpg', 'image3.jpg']; public var currentIndex:Number = 0; [Bindable] public var currentImage:String = imageURLs[currentIndex]; public function init ():void { timer = new Timer(500); timer.addEventListener(TimerEvent.TIMER, changeImage); timer.start(); } public function changeImage (e:TimerEvent):void { currentImage = imageURLs[currentIndex++ % imageURLs.length]; } ]] /mx:Script mx:VBox mx:Label text={currentImage}/ mx:Image source={currentImage}/ /mx:VBox /mx:Application Cheers, Lach On 30/11/2006, at 12:48 AM, KP wrote: Hi All, Well I want to know some simple approach for creating an image slide show. I have an XML file containing all path and source of the images. I don't want to give any more functionality except that images should changes every 5sec. Can some one suggest a quick and easy approach on this one Thanks, Kumar
Re: [flexcoders] Image Slide Show(Quick One)
Kumar, If you are up for an Image Slide Show with a bit more functionality than Lachlan's excellent reply on your request for a Quick One, you might want to check out the Photo Viewer Sample App that installs with Flex Builder 2. It uses an external xml file (galleries.xml) for loading each photo. You can view it in action here: http://examples.adobe.com/flex2/inproduct/sdk/photoviewer/PhotoViewer.html Note: This sample app has 3 views: ThumbnailView ..., CarouselView ..., SlideShowView At the link above, you switch views by clicking icons on the top right corner of the gray thumbnail viewer along the bottom. This Photo Viewer Sample App is easy to install via the Flex Builder 2 Flex Start Page (Install sequence: Main Menu - Help - Flex Start Page - More installed samples - Photo Viewer - Open Project) Regarding the XML that is uses, following is a sample from galleries.xml:: photo nameAcropolis: Matt Chotin/name descriptionAcropolis on Calton Hill in Edinburgh/description sourceflextravel/Acropolis on Calton Hill.jpg/source /photo Happy Flexing! Pete - Original Message From: KP [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Wednesday, November 29, 2006 5:48:58 AM Subject: [flexcoders] Image Slide Show(Quick One) !-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:12.0pt; font-family:Times New Roman;} a:link, span.MsoHyperlink {color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline;} span.EmailStyle17 { font-family:Arial; color:windowtext;} _filtered { margin:1.0in 1.25in 1.0in 1.25in;} div.Section1 {} -- Hi All, Well I want to know some simple approach for creating an image slide show. I have an XML file containing all path and source of the images. I don’t want to give any more functionality except that images should changes every 5sec. Can some one suggest a quick and easy approach on this one Thanks, Kumar Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com
[flexcoders] Image Slide Show(Quick One)
Hi All, Well I want to know some simple approach for creating an image slide show. I have an XML file containing all path and source of the images. I don't want to give any more functionality except that images should changes every 5sec. Can some one suggest a quick and easy approach on this one Thanks, Kumar