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

 

 

Reply via email to