Solved

Problem in Refreshing Flex Image Component Source

Posted on 2008-10-29
2
4,602 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

813 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

10 Experts available now in Live!

Get 1:1 Help Now