No the image does not exist in some cases.

So I would nee some kind of http-return-status to check what's
happening. And replace the image source to "notfound.jpg" for instance.

--- In [email protected], "Jim Robson" <[EMAIL PROTECTED]> wrote:
>
> Hey,
> 
> Do the images exist in your file system? In other words, is Flex
> failing to find images that actually exist? If so, could the problem
> be that LoadImage() is sometimes invoked before the data is loaded? 
> 
> -Jim 
> 
> --- In [email protected], "amigo_fd" <frank@> wrote:
> >
> > Hello,
> > 
> > I use a renderer to include an image in a grid. But some of the images
> > don't exist, and then they keep "flickering". Some stroboscopic
> > strange effect.
> > 
> > Any idea how I can detect if the image could load and prevent the
> > strange effect ?
> > 
> > This is the code of my renderer.
> > 
> > <?xml version="1.0"?>
> > <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml";
> > horizontalAlign="center" verticalGap="0" borderStyle="none">
> > 
> >     <mx:Script>
> >             <![CDATA[
> >                     private function LoadImage():void {                     
> >         
> >                             if (data != null) {
> >                                     ProductImage.source = ImageBaseUrl + 
> > "60/" + data.prodcode +
> ".jpg";
> >                             }
> >                     }                       
> >             ]]>
> >     </mx:Script>
> >     
> >     <mx:Image id="ProductImage" height="60" render="LoadImage();"
> > scaleContent="false"/>
> > </mx:VBox>
> >
>


Reply via email to