Hi, imageSource is a variable and it should be made [Bindable]
so the code will look somthing like [Bindable] public var imageSource:String; If that wont resolve your prob then instead of img.load(newPath); do... img.source = newPath; Regards, Harish. On 12/12/2008, Elango <[email protected]> wrote: > > try adding a timer to the path. > > public function refreshImage(newPath):void > { > imageSource = newPath + "?tme="+new Date(); > img.load(newPath); > } > > On Dec 12, 1:14 pm, dolly <[email protected]> wrote: >> Hi, >> >> I am trying to update an image after changing its path, i have turned >> off the browser caching, also tried setting >> >> cacheAsBitmap="false" cachePolicy="off" for the image. >> >> Yet, the image do not get refreshed immediately. >> I have also tried img.load(newPath). >> >> Does anyone know how can this problem be solved? >> >> here's the code snippet >> <mx:Image id="img" source="{imageSource}" width="100%" height="100%" >> maintainAspectRatio="false" /> >> >> private var imageSource:String = "../images/noImage.jpg" >> >> public function refreshImage(newPath):void >> { >> imageSource = newPath; >> img.load(newPath); >> >> } > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---

