I did something like this recently.  All the images were in the db.  We
wrote a cfc method that took the primary key as a param, and returned the
url of the image to display. 

Alternatively, you could make a straight http request, and listen for the
404 (fault handler?).  Depending on which handler (result or fault) fires,
you can then write the path of the image to display to your model, and bond
from there.


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Tuesday, January 29, 2008 1:40 PM
To: [email protected]
Subject: [AFFUG Discuss] flex logic

Ok someone remind me to get a Flex poster at the next meeting.

Need some logic help in flex.

Trying to mimic the fileexists from CF directly in flash/flex.

I have a resultset that has an item id that has to match an image.
I am building the the string like this:
source = 'assets/somedirectory/' + result.id + '.jpg'  (works correctly).

The database is read only and doesn't have any association with the images.

if match then display, else display default.

Now I want to check and see if the image is in the directory and display it
if it is.
If not display a default image.

Tried file reference to no avail.
Surely Flex has a means to look at a directory to see if a file exists.
Most of the blogs and articles I have found have to do with file upload or
download, I just want to see if an image is in  a directory or not.

Any thoughts appreciated.



-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the
subject line

For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------




-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the 
subject line

For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------


Reply via email to