Skip to main content
Srihari_Ch
Known Participant
April 3, 2009
Question

Problem with Text-box /TextField visibility?

  • April 3, 2009
  • 1 reply
  • 371 views
Hi all,

I am new to AS3 and Flash. I had created a TextField o stage. When a button is clicked, I need to display this textfield for a limited time period(say, 3 to 5 seconds) and then after 5 seconds, I want it to be invisible.

How can I achieve it?
It's very urgent....
Thanks in advance..


Srihari.Ch
SrihariCh is online now Report Post Edit/Delete Message
This topic has been closed for replies.

1 reply

Inspiring
April 6, 2009

Use the Timer class to fire a one time only TIMER event and hide the field when it goes off.

var t:Timer = new Timer( 5000, 1 )

t.addEventListener( TimerEvent.TIMER, hideField );

t.start()

function hideField( e:TimerEvent ):void

{

    my_field_txt.visible = false; // or something similar

}