<mx:Script> <![CDATA[ [Embed(source='image source')] public var img:Class;
]]> </mx:Script> <mx:Image source="{img}"/> use this block of code.it'll work...... On Fri, Dec 12, 2008 at 1:44 PM, dolly <dolly.sa...@gmail.com> 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 flex_india@googlegroups.com To unsubscribe from this group, send email to flex_india+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---