views:

21

answers:

1

hi guys....

suppose i have 10 image variables like this

var image1:String = http://somewhere.com/image1.jpg
var image2:string = .....image2.jpg
var image3:string = .....image3.jpg
and so forth.........

i have a timer that displays each variable as an image one a time ....

how do i "buffer" the image and display them instead of going out each time the timer runs? im asking because sometimes the server could slow or some other reason. so what i want to do is to download all those images and then display them from the clients computer. some sort like @Embed ???

complete newbie.. so please go slow on me ... :p

+1  A: 

I'm not sure exactly how your displaying the images based on the code snippet. However, I assume you are using the image tag and changing the source URL to change the image?

Instead of a bunch of string instances; have you tried a bunch of image instances? Something like this:

var image1 : Image = new Image()
image1.source = 'http://somewhere.com/image1.jpg'
var image2 : Image = new Image()
image2.source = 'http://somewhere.com/image2.jpg'

Then you can write some code to display, or not display, the images as appropriate; using a viewStack or other navigator.

www.Flextras.com
hi jeffrey ... :)well im displaying the strings with image.source .... so i guess its the same thing? ....
james
I didn't look up the API before posting; you are correct. I'll correct the code segment in my answer.
www.Flextras.com