Thanks Lach for your reply.

 

If you remember once you have replied for slideshow component creating it
quickly.

Well in that you were putting the urls of images in the array collection.and
then you were changing the source of images with the help of timer control.

I want to dynamically load all the images directly in the array collection
and then directly use get item method to show in the slide show.

Can this be done.

 

Kumar

 

 

 

 

  _____  

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Lachlan Cotter
Sent: Saturday, December 16, 2006 5:48 PM
To: [email protected]
Subject: Re: [flexcoders] Image Loading dynamically

 

Hi Kumar,

 

When you say 'loaded already', do you mean that you want the images to be
pre-compiled into the SWF? There may be a better way to do it, but this is
one method that seems to work.

 

<?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">

 

            <mx:Script>

                        <![CDATA[

                                    import mx.collections.ArrayCollection;

                        

                                    [Embed(source='image1.jpg')]

                                    private var image1:Class;

                                    

                                    [Embed(source='image2.jpg')]

                                    private var image2:Class;

                                    

                                    [Bindable]

                                    private var myImages:ArrayCollection = 

                                                new ArrayCollection([image1,
image2]);      

                        ]]>

            </mx:Script>

            

            <mx:Image source="{myImages.getItemAt(0)}"/>

            

</mx:Application>

 

Cheers,

Lach

 

On 16/12/2006, at 7:37 PM, KP wrote:





Hi All,

Is there a way to load complete set of images in any array or any thing like
that so that later it can be used for any other purpose example slide
show.Currently I am storing source of the image in an xml file and from
there I am changing or rather assigning source of image control to create an
slide show but what I want is to create a slide show in which all the images
are loaded already in any variable or collection and then I can manipulate
that collection to switch the source of image.

Kumar

 

 

Reply via email to