What is it with me and images at the moment...?
Anyway, I'm having trouble with displaying thumbnails in a custom cell
renderer within a TileList component. The code for the cell renderer is
displayed below (AssetThumbnail.mxml) and the line that defines the
TileList is also shown (ThumbnailView.mxml).
When the user clicks on a given item, a search is performed which
populates the aAssetSearch array with the appropriate Asset instances to
display thumbnails for; this is then bound to the TileList as the
dataProvider. When the list of images are displayed, one of the
following happens:
1. the thumbnail displays correctly;
2. displays correctly, then after a second or so vanishes;
3. nothing is displayed.
My guess is that #3 is actually #2 happening very quickly so the "in
between" redraw doesn't actually happen. I can often get the missing
images to redisplay by performing a new search and then going back to
the original, at which point the original search's assets have already
been pulled back from the database and cached. Sometimes this can be
achieved by scrolling the TileList up and down to redraw the appropriate
cells. Neither of these two methods either works 100% of the time, and
quite often the cells remain blank.
This pointed me towards the thought that there was something strange
going on with the Asset instances that meant they weren't returning the
appropriate URL for the image, or it was being returned and then reset.
However, I tried adding a trace into the dynamic "get" function for the
thumbnail URL (see code for Asset.as below) and all looks fine (i.e. it
returned the URL correctly).
Has anyone got any idea why this may be happening?
Thanks,
Tim.
ThumbnailView.mxml:
---
AssetThumbnail.mxml:
http://www.macromedia.com/2003/mxml";
width="100%" height="100%" horizontalAlign="center"
verticalAlign="middle" toolTip="{asset.title}">
Asset.as
[ChangeEvent("thumbURLChanged")]
public function get thumbURL(): String {
return AssetManager.getInstance().getAssetPath(_thumbfile,
true,
"thumb");
}
public function set thumbURL(sURL: String): Void {
dispatchEvent( {type:"thumbURLChanged"} );
}
--
---
Badpen Tech - CF and web-tech: http://tech.badpen.com/
---
RAWNET LTD - independent digital media agency
"We are big, we are funny and we are clever!"
New site launched at http://www.rawnet.com/
---
This message may contain information which is legally
privileged and/or confidential. If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of rawnet limited,
unless otherwise explicitly and independently indicated
by an authorised representative of rawnet limited.
---
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/