Solved

Problem in Refreshing Flex Image Component Source

Posted on 2008-10-29
2
4,594 Views
Last Modified: 2012-06-27
I have a Flex application for show some images, when I load dynamic contents, for a differents source (like xml from php), not problem with image component content.

My application have a module for change image source for groups and subgroups of images files, this image of group is use like album front.

When I change image file (only content not the name) from a filereference, flex application reload or reassign the source to image component, but the image component show old content.

The old and new content have the same file name, I know what this a problem with internet cache, so I need know if possible force to image component reload or reprocess the source with the same file name.

Example by pseudocode:
original content from xml: imgView.source = @image //("albums/album1/photo0001.jpg")
run and load filereference and get new content, but with the same name, the filename (albums/album1/photo0001.jpg) is overwrite by php code.
reassign image content: imgView.source=null, imgView.source = ""albums/album1/photo0001.jpg" show the old content (old image file) not the new content in same file.

Is possible force to image component reprocess source content for get new image from the same file name?. Use of Bitmap analysis can help me?
0
Comment
Question by:Myshka
2 Comments
 
LVL 19

Accepted Solution

by:
Gary Benade earned 125 total points
ID: 22844487
Hi, try this

imgView.source = "albums/album1/photo0001.jpg" + "?" + new Date().time;

This will add the current timestamp in milliseconds to the image url making it unique and ensure a fresh load

Gary
0
 

Author Closing Comment

by:Myshka
ID: 31511503
Good tips.
Very thanks
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
Moving applications to the cloud or switching services to cloud-based ones, is a stressful job.  Here's how you can make it easier.
This video discusses moving either the default database or any database to a new volume.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now