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: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of KP
Sent: Friday, December 01, 2006 3:20 PM
To: 'Lachlan Cotter'; [email protected]
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: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Lachlan Cotter
Sent: Friday, December 01, 2006 3:03 AM
To: [email protected]
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