I don’t think your reset function does what you want it to – it sets the source path to the Image to null. That will make the image invisible … but you’ll never see it again without setting the source path back to something reasonable. Try toggling the visible flag instead…
Chet. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of NATA RAJAN Sent: Monday, September 22, 2008 8:55 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] second time image is not appearing Hi <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:TextArea x="154" y="92" id="t1" height="27"/> <mx:Script> <![CDATA[ import mx.controls.Alert; import mx.controls.Image; import mx.controls.Button; public function hello():void { t2.text=t1.text; } public function hi():void { t1.text=""; t2.text=""; } public function bclick1(event:Event):void { //img.visible=img.source; if((img.visible)==false) { Alert.show("testing"); img.v! isible=true } } public function rst():void { img.source=""; } ]]> </mx:Script> <mx:Button x="95" y="226" label="submit" click="hello()"/> <mx:Label x="48" y="92" text="text1" width="60" height="44"/> <mx:Label x="48" y="169" text="text2"/> <mx:TextInput x="154" y="167" id="t2"/> <mx:Button x="201" y="226" label="cancel" click="hi()"/> <mx:Button x="301" y="226" label="image" click="bclick1(event)"/> <mx:Image x="363" y="76" width="81" height="80" id="img" autoLoad="true" visible="false"> <mx:source>scooby.jpeg</mx:source> </mx:Image> <mx:Button x="201" y="277" label="Reset" click="rst()"/> ! ; </mx:Application> when click first time image button the image will appear then i click reset button means the image button will disappear . if am clicking again the image button will not be appear Help me plz.......... Note : i attached my image regards Natarajan ________________________________ Unlimited freedom, unlimited storage. Get it now<http://in.rd.yahoo.com/tagline_mail_2/*http:/help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/>