Hi NATA,
Please change your function rst() function with following and it will start
working.
public function rst():void
{
img.visible=false;
}
Best Regards,
Anand Kothalkar
--- On Mon, 9/22/08, NATA RAJAN <[EMAIL PROTECTED]> wrote:
From: NATA RAJAN <[EMAIL PROTECTED]>
Subject: [flexcomponents] second time image is not appearing
To: [email protected]
Date: Monday, September 22, 2008, 4:01 PM
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.visible= 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